mIRC Home    About    Download    Register    News    Help

Print Thread
a little help plz? #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
    }
  }
}

Re: a little help plz? [Re: sigbin] #182795 14/08/07 09:24 PM
Joined: Dec 2002
Posts: 3,547
S
SladeKraven Offline
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 3,547
Well, haven't you tried it?

Re: a little help plz? [Re: SladeKraven] #182808 15/08/07 03:33 AM
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...

Re: a little help plz? [Re: sigbin] #182809 15/08/07 03:39 AM
Joined: Nov 2006
Posts: 1,559
H
Horstl Offline
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.
Re: a little help plz? [Re: Horstl] #182815 15/08/07 04:44 AM
Joined: Jun 2006
Posts: 508
D
deegee Offline
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

Re: a little help plz? [Re: deegee] #182824 15/08/07 06:44 AM
Joined: Jul 2006
Posts: 3,615
W
Wims Offline
Hoopy frood
Offline
Hoopy frood
W
Joined: Jul 2006
Posts: 3,615
ban -ku75 # $nick 1 no addr

original code was :

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


Looking for a good help channel about mIRC? Check #mircscripting @ irc.swiftirc.net
Re: a little help plz? [Re: sigbin] #182827 15/08/07 08:25 AM
Joined: Dec 2002
Posts: 3,547
S
SladeKraven Offline
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.

Re: a little help plz? [Re: SladeKraven] #182829 15/08/07 11:36 AM
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...

Re: a little help plz? [Re: sigbin] #182868 15/08/07 11:16 PM
Joined: Aug 2004
Posts: 7,252
R
RusselB Offline
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.

Re: a little help plz? [Re: sigbin] #182878 16/08/07 12:27 AM
Joined: Jun 2006
Posts: 508
D
deegee Offline
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
  }
}


Re: a little help plz? [Re: deegee] #182885 16/08/07 01:10 AM
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