mIRC Home    About    Download    Register    News    Help

Print Thread
#182769 14/08/07 03:55 PM
Joined: Jun 2004
Posts: 124
S
sigbin Offline OP
Vogon poet
OP Offline
Vogon poet
S
Joined: Jun 2004
Posts: 124
is this correct? i edit what i found in this forum so im askin is this corect?
Code:
alias re.link return (?:\w+\:\/\/)?[\w\.]+\.(?:com|net|org|biz|us|ca|uk|ph|info)(?:[\w\/\%\.]*?)
alias re.mail return [\w.]+\@[\w.]+

on *:text:*:#channel:{
  if ($nick !isop $chan) {
    if ($regex($1,/ $+ $re.mail $+ /i)) {
      .kick # *!* $+ $address $+ * 1 75 no adds
    }
    elseif ($regex($1,/ $+ $re.link $+ /i)) {
      .kick # *!* $+ $address $+ * 1 75 no adds
    }
  }
}

Joined: Dec 2002
Posts: 3,547
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 3,547
Well, haven't you tried it?

Joined: Jun 2004
Posts: 124
S
sigbin Offline OP
Vogon poet
OP Offline
Vogon poet
S
Joined: Jun 2004
Posts: 124
if this was working im not posting here to ask help...

Joined: Nov 2006
Posts: 1,559
H
Hoopy frood
Offline
Hoopy frood
H
Joined: Nov 2006
Posts: 1,559
Code:
.kick # *!* $+ $address $+ * 1 75 no adds
hum, why not
Code:
.kick # $nick no adds

If you want to perform a kickban combination (including a 75 seconds ban on *!*user@host.domain), use these two lines instead:
Code:
ban -u75 # $address($nick,1)
kick # $nick no adds

Last edited by Horstl; 15/08/07 03:47 AM.
Joined: Jun 2006
Posts: 508
D
Fjord artisan
Offline
Fjord artisan
D
Joined: Jun 2006
Posts: 508
Originally Posted By: Horstl
If you want to perform a kickban combination (including a 75 seconds ban on *!*user@host.domain), use these two lines instead:
Code:
ban -u75 # $address($nick,1)
kick # $nick no adds


Or
Code:
  ban -ku75 # $nick 2 no ads

Joined: Jul 2006
Posts: 4,145
W
Hoopy frood
Offline
Hoopy frood
W
Joined: Jul 2006
Posts: 4,145
ban -ku75 # $nick 1 no addr

original code was :

ban -u75 # $address($nick,1)
kick # $nick no adds


#mircscripting @ irc.swiftirc.net == the best mIRC help channel
Joined: Dec 2002
Posts: 3,547
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 3,547
You asked if it was correct, the only way to find out would be to test the code yourself.

Joined: Jun 2004
Posts: 124
S
sigbin Offline OP
Vogon poet
OP Offline
Vogon poet
S
Joined: Jun 2004
Posts: 124
iv tested it and i cant make it work... that why im askin if that code is correct... why bother posting here i can make my code work... sladekraven will you post here if your code is working? its the same with me i dont like posting in forum but these no way i can make my code work if there is a problem that i dont know...

sladekraven if your not helping why bother replying to my post? or if you dont like me to post here just delete my account here in mirc...

Joined: Aug 2004
Posts: 7,252
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
In your original post, you would've been better to have said that you were having trouble getting the code to work, rather than asking if it was correct. A number of people have posted codes here asking if they were right, and just have been too lazy to test the codes themselves. This is what it looked like you were doing.

Now that we know differently, someone will probably be more than willing to assist you. I regret not being able to do so, due to my lack of knowledge regarding regex, which your code uses.

Joined: Jun 2006
Posts: 508
D
Fjord artisan
Offline
Fjord artisan
D
Joined: Jun 2006
Posts: 508
For one, you're only checking the first word for urls/emails (if ($regex($1,/ $+ $re.mail $+ /i))) when it should be $1-

Try this, a slight recode; changed the email expression a little (added a couple more valid chars) and changed the way the re.* aliases work.

Code:
alias re.link return $regex($1-,/(?:\w+\:\/\/)?[\w\.]+\.(?:com|net|org|biz|us|ca|uk|ph|info)(?:[\w\/\%\.]*?)/)
alias re.mail return $regex($1-,/(?:(?:[\w.%+-])+@(?:[\w-]+\.)+[a-z]{2,4})\b/i)
on @*:text:*:#channel:{
  if ($nick !isop #) && ($re.mail($1-) || $re.link($1-)) {
    ban -ku75 # $nick 1 no adds
  }
}


Joined: Jun 2004
Posts: 124
S
sigbin Offline OP
Vogon poet
OP Offline
Vogon poet
S
Joined: Jun 2004
Posts: 124
thankz for the reminder... thankz for the reply


Link Copied to Clipboard