mIRC Home    About    Download    Register    News    Help

Print Thread
#170608 11/02/07 05:23 PM
Joined: Feb 2007
Posts: 1
M
myg7o1 Offline OP
Mostly harmless
OP Offline
Mostly harmless
M
Joined: Feb 2007
Posts: 1
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.

myg7o1 #170619 11/02/07 07:45 PM
Joined: Jan 2007
Posts: 259
K
Fjord artisan
Offline
Fjord artisan
K
Joined: Jan 2007
Posts: 259
I'd advise to just do "/mode #channel +b Takeover-*!*@*" (wihtout "s).


Those who can, cannot. Those who cannot, can.
myg7o1 #170626 11/02/07 09:33 PM
Joined: Jan 2007
Posts: 1,156
D
Hoopy frood
Offline
Hoopy frood
D
Joined: Jan 2007
Posts: 1,156
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 } }

DJ_Sol #170639 12/02/07 02:09 AM
Joined: Oct 2006
Posts: 342
L
Fjord artisan
Offline
Fjord artisan
L
Joined: Oct 2006
Posts: 342
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 }
}


learn learn learn

Link Copied to Clipboard