mIRC Homepage
Posted By: myg7o1 [Req] kickscript - 11/02/07 05:23 PM
Hey there

I need a script (which I don't know how to code)

I want that if a user with tag "Takeover-" joins, it pings the guy and if it reply's on ping it will automaticly kick the guy, if there is someone with normal username joins it wont ping it and wont kick it.

Please help me out.
Posted By: Kardafol Re: [Req] kickscript - 11/02/07 07:45 PM
I'd advise to just do "/mode #channel +b Takeover-*!*@*" (wihtout "s).
Posted By: DJ_Sol Re: [Req] kickscript - 11/02/07 09:33 PM
It's been a while since Ive used ctcp. (My server has ctcp's disabled) I cannot test the username return either so this code is relatively untested.

#1 you have the switch to turn who on join on or off.
#2 on join if switch is on who $nick
#3 raw 352 (who return) if Takeover is in $9- (usertag) set a variable to let script know you want the nick kicked on ping reply then ctcp ping $nick
#4 on ctcpreply PING if variable is there kick nick unset variable to clean up.

Its been a while since Ive used PING's and ctcpreply's I could be wrong but this is the basic idea. smile

Code:
menu menubar {
-
Join Ping:{ $iif(%jping,unset,set) %jping $true }
-
}
on !@*:join:#:{
if (%jping) who $nick
}
raw 352:*:{
if (Takeover isin $9-) { set %tping $3 | ctcp $3 PING }
}
on *:ctcpreply:PING:{ if ($nick == %tping) { kick $chan $nick | unset %tping } }
Posted By: learn3r Re: [Req] kickscript - 12/02/07 02:09 AM
Code:
menu menubar {
  -
  Join Ping:{ $iif(%jping,unset,set) %jping $true }
  -
}
on !@:join:#: {
  if (%jping) {
    if (Takeover- iswm $nick) { set %tnick $nick | set %tchan $chan | ctcp $nick ping }
  }
}
on *:ctcpreply:PING:{
  if ($nick == %tnick) { kick %tchan %tnick | unset %tnick | unset %tchan }
}
© mIRC Discussion Forums