mIRC Home    About    Download    Register    News    Help

Print Thread
Page 1 of 2 1 2
HELP, On part message #210901 29/03/09 04:56 AM
Joined: Mar 2009
Posts: 18
S
sillyboy Offline OP
Pikka bird
OP Offline
Pikka bird
S
Joined: Mar 2009
Posts: 18
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?

Re: HELP, On part message [Re: sillyboy] #210905 29/03/09 06:01 AM
Joined: Aug 2004
Posts: 7,252
R
RusselB Offline
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
Code:
on @*:part:#:{
  if badword isin $1- {
    ban $chan $nick
  }
}


Re: HELP, On part message [Re: sillyboy] #210908 29/03/09 07:25 AM
Joined: Mar 2009
Posts: 18
S
sillyboy Offline OP
Pikka bird
OP Offline
Pikka bird
S
Joined: Mar 2009
Posts: 18
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.

Re: HELP, On part message [Re: sillyboy] #210909 29/03/09 07:40 AM
Joined: Aug 2004
Posts: 7,252
R
RusselB Offline
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
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>


Re: HELP, On part message [Re: sillyboy] #210910 29/03/09 07:49 AM
Joined: Mar 2009
Posts: 18
S
sillyboy Offline OP
Pikka bird
OP Offline
Pikka bird
S
Joined: Mar 2009
Posts: 18
/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 ?

Re: HELP, On part message [Re: sillyboy] #210913 29/03/09 07:55 AM
Joined: Mar 2009
Posts: 18
S
sillyboy Offline OP
Pikka bird
OP Offline
Pikka bird
S
Joined: Mar 2009
Posts: 18
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

Re: HELP, On part message [Re: RusselB] #210920 29/03/09 01:49 PM
Joined: Dec 2008
Posts: 1,511
westor Offline
Hoopy frood
Offline
Hoopy frood
Joined: Dec 2008
Posts: 1,511
Originally Posted By: RusselB
Code:
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:

Code:
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)
}


Re: HELP, On part message [Re: westor] #210922 29/03/09 02:01 PM
Joined: Mar 2009
Posts: 18
S
sillyboy Offline OP
Pikka bird
OP Offline
Pikka bird
S
Joined: Mar 2009
Posts: 18
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

Re: HELP, On part message [Re: sillyboy] #210926 29/03/09 02:16 PM
Joined: Dec 2008
Posts: 1,511
westor Offline
Hoopy frood
Offline
Hoopy frood
Joined: Dec 2008
Posts: 1,511
Originally Posted By: 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

Code:
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!

Re: HELP, On part message [Re: westor] #210932 29/03/09 03:08 PM
Joined: Mar 2009
Posts: 18
S
sillyboy Offline OP
Pikka bird
OP Offline
Pikka bird
S
Joined: Mar 2009
Posts: 18
Hi, if notice how?

Just replace the on text to on notice right?

Btw, thank you very much=)

Re: HELP, On part message [Re: sillyboy] #210934 29/03/09 03:10 PM
Joined: Mar 2009
Posts: 18
S
sillyboy Offline OP
Pikka bird
OP Offline
Pikka bird
S
Joined: Mar 2009
Posts: 18
Btw, If i have 2 words together, e.g 'Bad word' any solution for this?

Re: HELP, On part message [Re: westor] #210935 29/03/09 03:14 PM
Joined: Mar 2009
Posts: 18
S
sillyboy Offline OP
Pikka bird
OP Offline
Pikka bird
S
Joined: Mar 2009
Posts: 18
Originally Posted By: westor
Originally Posted By: 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

Code:
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.
Re: HELP, On part message [Re: sillyboy] #210936 29/03/09 03:15 PM
Joined: Feb 2003
Posts: 3,432
S
sparta Offline
Hoopy frood
Offline
Hoopy frood
S
Joined: Feb 2003
Posts: 3,432
Try use the edit button, no need to post 3 post's in a row when you can edit your old one.


if ($me != tired) { return } | else { echo -a Get a pot of coffee now $+($me,.) }
Re: HELP, On part message [Re: sillyboy] #210941 29/03/09 03:44 PM
Joined: Dec 2008
Posts: 1,511
westor Offline
Hoopy frood
Offline
Hoopy frood
Joined: Dec 2008
Posts: 1,511
hmm.. yes i didn't think this so paste this and retry:

Code:
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
}

Re: HELP, On part message [Re: westor] #210959 29/03/09 11:19 PM
Joined: Mar 2009
Posts: 18
S
sillyboy Offline OP
Pikka bird
OP Offline
Pikka bird
S
Joined: Mar 2009
Posts: 18
Originally Posted By: westor
hmm.. yes i didn't think this so paste this and retry:

Code:
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?

Re: HELP, On part message [Re: sillyboy] #210960 29/03/09 11:40 PM
Joined: Jul 2007
Posts: 1,129
T
Tomao Offline
Hoopy frood
Offline
Hoopy frood
T
Joined: Jul 2007
Posts: 1,129
I guess you can by changing it to:
Code:
.set %badnick-host $address($2,2)

Re: HELP, On part message [Re: Tomao] #210963 29/03/09 11:51 PM
Joined: Mar 2009
Posts: 18
S
sillyboy Offline OP
Pikka bird
OP Offline
Pikka bird
S
Joined: Mar 2009
Posts: 18
Originally Posted By: Tomao
I guess you can by changing it to:
Code:
.set %badnick-host $address($2,2)


Hmm its didn't work. any idea?

Re: HELP, On part message [Re: sillyboy] #210974 30/03/09 05:55 AM
Joined: Jul 2007
Posts: 1,129
T
Tomao Offline
Hoopy frood
Offline
Hoopy frood
T
Joined: Jul 2007
Posts: 1,129
Try this:
Code:
raw 311:*: { .set %badnick-host *!* $+ @ $+ $4 }

Re: HELP, On part message [Re: Tomao] #210975 30/03/09 06:36 AM
Joined: Mar 2009
Posts: 18
S
sillyboy Offline OP
Pikka bird
OP Offline
Pikka bird
S
Joined: Mar 2009
Posts: 18
Originally Posted By: Tomao
Try this:
Code:
raw 311:*: { .set %badnick-host *!* $+ @ $+ $4 }


THANKS EVERYONE xD

Re: HELP, On part message [Re: sillyboy] #211038 01/04/09 01:07 PM
Joined: Feb 2006
Posts: 546
J
jaytea Offline
Fjord artisan
Offline
Fjord artisan
J
Joined: Feb 2006
Posts: 546
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


"The only excuse for making a useless script is that one admires it intensely" - Oscar Wilde
Page 1 of 2 1 2