| 
    
| 
 | 
 
 
| 
 | 
 
| 
 
sillyboy
 
 | 
 
| 
 sillyboy 
 | 
I need to create a script once user part the channel with bad message e.g, * Parts: tess (badword) , my script will auto ban. 
  any idea? 
 
 |  
 
 | 
 
 
 |  
 
| 
 | 
 
Joined:  Aug 2004 
Posts: 7,168  
Hoopy frood 
 | 
 
 
Hoopy frood 
Joined:  Aug 2004 
Posts: 7,168  | 
on @*:part:#:{
  if badword isin $1- {
    ban $chan $nick
  }
}
 
 
 |  
 
 | 
 
 
 |  
 
| 
 | 
 
| 
 
sillyboy
 
 | 
 
| 
 sillyboy 
 | 
Hi, if a user pm me with badword, How to get his/her host from his nick. 
  Its seems like if he/she on the channel then my script can get his/her host. If its from private message, i can't get his/she host. 
 
 |  
 
 | 
 
 
 |  
 
| 
 | 
 
Joined:  Aug 2004 
Posts: 7,168  
Hoopy frood 
 | 
 
 
Hoopy frood 
Joined:  Aug 2004 
Posts: 7,168  | 
You'll want to read up on raw numerics if you plan on using this in a script.
  Options: 1) /userhost <nick> 2) /who <nick> 3) /whois <nick>
 
  
 
 |  
 
 | 
 
 
 |  
 
| 
 | 
 
| 
 
sillyboy
 
 | 
 
| 
 sillyboy 
 | 
/whois nick is better option?
  But I need the script to whois it and won't show in my status window lol. btw, what is raw numerics ? 
 
 |  
 
 | 
 
 
 |  
 
| 
 | 
 
| 
 
sillyboy
 
 | 
 
| 
 sillyboy 
 | 
on *:TEXT:*badword*:*:{   .ignore $nick   var %ip = $address($nick,2)   .msg $me %ip test }
  But if user pm me, i can't get the ip. So i need to whois them. lol  
 
 |  
 
 | 
 
 
 |  
 
| 
 | 
 
Joined:  Dec 2008 
Posts: 1,483  
Hoopy frood 
 | 
 
 
Hoopy frood 
Joined:  Dec 2008 
Posts: 1,483  | 
on @*:part:#:{
  if badword isin $1- {
    ban $chan $nick
  }
}
  you can make this with variables and add or remove a badword anytime from the list with the /addbadword or /rembadword aliases e.g: 
on !*:part:#: {
  if ($istok($1-,%badwords,32)) {
    .ban $chan $nick
  }
}
alias rembadword {
  if ($1) {
    if (!$istok(%badwords,$1,32)) { .var %e $input(Can not remove this " $+ $1 $+ " badword is not in the badword list!,houd,Error) | .halt }
    .set %badwords $remtok(%badwords,$1,32)
    .var %k $input(Successfully removed " $+ $1 $+ " from the badword list,oid,Information)
  }
  else .var %e $input(Wrong syntax: try using /rembadword <badword>,houd,Error)
}
alias addbadword {
  if ($1) {
    if ($istok(%badwords,$1,32)) { .var %e $input(Can not add this " $+ $1 $+ " badword is allready in the badword list!,houd,Error) | .halt }
    .set %badwords $addtok(%badwords,$1,32)
    .var %k $input(Successfully added " $+ $1 $+ " into the badword list,oid,Information)
  }
  else .var %e $input(Wrong syntax: try using /addbadword <badword>,houd,Error)
}
 
 
 |  
 
 | 
 
 
 |  
 
| 
 | 
 
| 
 
sillyboy
 
 | 
 
| 
 sillyboy 
 | 
Oh that good. Thanks!
  btw do you have any idea for this,
  Hi, if a user pm me with badword, How to get his/her host from his nick. 
  Its seems like if he/she on the channel then my script can get his/her host. If its from private message, i can't get his/she host. 
  on *:TEXT:*badword*:*:{ .ignore $nick var %ip = $address($nick,2) .msg $me %ip test }
  But if user pm me, i can't get the ip. So i need to whois them. lol 
  
 
 |  
 
 | 
 
 
 |  
 
| 
 | 
 
Joined:  Dec 2008 
Posts: 1,483  
Hoopy frood 
 | 
 
 
Hoopy frood 
Joined:  Dec 2008 
Posts: 1,483  | 
Oh that good. Thanks!
  btw do you have any idea for this,
  Hi, if a user pm me with badword, How to get his/her host from his nick. 
  Its seems like if he/she on the channel then my script can get his/her host. If its from private message, i can't get his/she host. 
  on *:TEXT:*badword*:*:{ .ignore $nick var %ip = $address($nick,2) .msg $me %ip test }
  But if user pm me, i can't get the ip. So i need to whois them. lol    try using this code paste it into your remotes and remove the older 
on !*:TEXT:*:?: {
  if ($istok($1-,%badwords,32)) {
    .msg $nick [ $+ $nick $+ ]: You are now added into my ignore list reason ( $+ $1- $+ )
    .ignore -p $nick | .closemsg $nick
    .timer 1 0 .echo $color(info) -at 4[ $+ $color(info) $+ Warning4] $+ $color(info) $+ : The user  $+ $nick $+  with address ( $+ $address($nick,2) $+ ) just told you the badword ( $+ $1- $+ ) and ignored!
  }
}
 ATTENTION: This remote is for private only and the user will be ignored only for sending you private messages! 
 
 |  
 
 | 
 
 
 |  
 
| 
 | 
 
| 
 
sillyboy
 
 | 
 
| 
 sillyboy 
 | 
Hi, if notice how?
  Just replace the on text to on notice right?
  Btw, thank you very much=) 
 
 |  
 
 | 
 
 
 |  
 
| 
 | 
 
| 
 
sillyboy
 
 | 
 
| 
 sillyboy 
 | 
Btw, If i have 2 words together, e.g 'Bad word' any solution for this? 
 
 |  
 
 | 
 
 
 |  
 
| 
 | 
 
| 
 
sillyboy
 
 | 
 
| 
 sillyboy 
 | 
Oh that good. Thanks!
  btw do you have any idea for this,
  Hi, if a user pm me with badword, How to get his/her host from his nick. 
  Its seems like if he/she on the channel then my script can get his/her host. If its from private message, i can't get his/she host. 
  on *:TEXT:*badword*:*:{ .ignore $nick var %ip = $address($nick,2) .msg $me %ip test }
  But if user pm me, i can't get the ip. So i need to whois them. lol    try using this code paste it into your remotes and remove the older 
on !*:TEXT:*:?: {
  if ($istok($1-,%badwords,32)) {
    .msg $nick [ $+ $nick $+ ]: You are now added into my ignore list reason ( $+ $1- $+ )
    .ignore -p $nick | .closemsg $nick
    .timer 1 0 .echo $color(info) -at 4[ $+ $color(info) $+ Warning4] $+ $color(info) $+ : The user  $+ $nick $+  with address ( $+ $address($nick,2) $+ ) just told you the badword ( $+ $1- $+ ) and ignored!
  }
}
 ATTENTION: This remote is for private only and the user will be ignored only for sending you private messages! Hi, I tested this script, But its seems like i can't get his/her host =>> [Warning]: The user user_1w with address () just told you the badword (test sucker test) and ignored! Its seems like, If the user pm me, i can't get his/her host but If the user inside a channel with me, i can get his/her host. any solution?  
Last edited by sillyboy; 29/03/09 03:14 PM.
 
 
 |  
 
 | 
 
 
 |  
 
| 
 | 
 
Joined:  Feb 2003 
Posts: 3,412  
Hoopy frood 
 | 
 
 
Hoopy frood 
Joined:  Feb 2003 
Posts: 3,412  | 
Try use the edit button, no need to post 3 post's in a row when you can edit your old one. 
 
 |  
 
 | 
 
 
 |  
 
| 
 | 
 
Joined:  Dec 2008 
Posts: 1,483  
Hoopy frood 
 | 
 
 
Hoopy frood 
Joined:  Dec 2008 
Posts: 1,483  | 
hmm.. yes i didn't think this so paste this and retry: 
on !*:TEXT:*:?: {
  if ($istok($1-,%badwords,32)) {
    .enable #badword
    .whois $nick
    .msg $nick [ $+ $nick $+ ]: You are now added into my ignore list reason ( $+ $1- $+ )
    .ignore -p $nick | .closemsg $nick | .set %badword-nick $nick | .set %badword-say $1-
    .timer 1 3 .badword_inform
  }
}
#badword off
raw 311:*: { .set %badnick-host $3 $+ @ $+ $4 }
#badword end
alias badword_inform {
  .echo $color(info) -ast 4[ $+ $color(info) $+ Warning4] $+ $color(info) $+ : The user  $+ %badword-nick $+  with address ( $+ %badnick-host $+ ) just told you the badword ( $+ %badword-say $+ ) and ignored!
  .unset %badword-*
  .disable #badword
}
 
 
 |  
 
 | 
 
 
 |  
 
| 
 | 
 
| 
 
sillyboy
 
 | 
 
| 
 sillyboy 
 | 
hmm.. yes i didn't think this so paste this and retry: 
on !*:TEXT:*:?: {
  if ($istok($1-,%badwords,32)) {
    .enable #badword
    .whois $nick
    .msg $nick [ $+ $nick $+ ]: You are now added into my ignore list reason ( $+ $1- $+ )
    .ignore -p $nick | .closemsg $nick | .set %badword-nick $nick | .set %badword-say $1-
    .timer 1 3 .badword_inform
  }
}
#badword off
raw 311:*: { .set %badnick-host $3 $+ @ $+ $4 }
#badword end
alias badword_inform {
  .echo $color(info) -ast 4[ $+ $color(info) $+ Warning4] $+ $color(info) $+ : The user  $+ %badword-nick $+  with address ( $+ %badnick-host $+ ) just told you the badword ( $+ %badword-say $+ ) and ignored!
  .unset %badword-*
  .disable #badword
}
  Yes, It works now! thanks. Btw, can i filter the host by $address( $nick, 2 ) any idea?  
 
 |  
 
 | 
 
 
 |  
 
| 
 | 
 
Joined:  Jul 2007 
Posts: 1,124  
Hoopy frood 
 | 
 
 
Hoopy frood 
Joined:  Jul 2007 
Posts: 1,124  | 
I guess you can by changing it to:  .set %badnick-host $address($2,2)  
 
 |  
 
 | 
 
 
 |  
 
| 
 | 
 
| 
 
sillyboy
 
 | 
 
| 
 sillyboy 
 | 
I guess you can by changing it to:  .set %badnick-host $address($2,2)   Hmm its didn't work. any idea?  
 
 |  
 
 | 
 
 
 |  
 
| 
 | 
 
Joined:  Jul 2007 
Posts: 1,124  
Hoopy frood 
 | 
 
 
Hoopy frood 
Joined:  Jul 2007 
Posts: 1,124  | 
Try this: raw 311:*: { .set %badnick-host *!* $+ @ $+ $4 }   
 
 |  
 
 | 
 
 
 |  
 
| 
 | 
 
| 
 
sillyboy
 
 | 
 
| 
 sillyboy 
 | 
Try this: raw 311:*: { .set %badnick-host *!* $+ @ $+ $4 }   THANKS EVERYONE xD  
 
 |  
 
 | 
 
 
 |  
 
| 
 | 
 
Joined:  Feb 2006 
Posts: 523  
Fjord artisan 
 | 
 
 
Fjord artisan 
Joined:  Feb 2006 
Posts: 523  | 
surprised no-one mentioned this but you don't need to whois someone to get their host if they send you a pm. in the text event their type 2 mask is $wildsite
  if you still want the alias called from a timer you'll need to do something like pass $wildsite to the alias as $1 
 
 |  
 
 | 
 
 
 |  
 
 
   |  
 
 | 
 
| 
 
 
 | 
 
 
     | 
     |