| View previous topic :: View next topic |
| Author |
Message |
blake Master
Joined: 23 Feb 2009 Posts: 201
|
Posted: Sat Nov 28, 2009 5:13 pm Post subject: setban time script(Solved) |
|
|
Hey im looking for a simple bit of scripting that will do the following set +b on a user and beable to set a ban time it will then message chanserv and chanserv will kick the user this is what im using at the moment just cant get the variable btime to to work
| Code: | bind msg ho|ho bankick cmd:bankick
proc cmd:bankick {nick uhost hand arg} {
set chan [lindex [split $arg] 0]
set username [lindex [split $arg] 1]
set reason [lrange [split $arg] 2 end]
putserv "MODE $chan +b $username"
putserv "PRIVMSG chanserv kick $chan $username $reason (Issued By $nick"
}
|
_________________ Blake
UKEasyHosting UKStormWatch
Last edited by blake on Sun Nov 29, 2009 1:12 pm; edited 1 time in total |
|
| Back to top |
|
 |
TCL_no_TK Owner

Joined: 25 Aug 2006 Posts: 509 Location: England, Yorkshire
|
Posted: Sun Nov 29, 2009 10:33 am Post subject: |
|
|
It dosen't need a bantime but if one is given it will be <#chan> <nickname> <reason> <bantime> | Code: | proc cmd:bankick {nick host hand text} {
set chan [lindex [split $text] 0]
set user [lindex [split $text] 1]
set why [join [lrange [split $text] 2 end-1]]
set chk [join [lrange [split $text] end end]]
if {![regexp -- {^[0-9]} $chk]} {set why [join [lrange [split $text] 2 end]]} else {set bantime [join [lrange [split $text] end end]]}
if {[info exists bantime]} {
putserv "MODE $chan +b $user"
putserv "PRIVMSG ChanServ KICK $chan $user $why) (Issued By $nick"
timer $bantime [list putserv "MODE $chan -b $user"]
return 1
} else {
putserv "MODE $chan +b $user"
putserv "PRIVMSG ChanServ KICK $chan $user $why) (Issued By $nick"
return 1
}
}
bind msg ho|ho bankick cmd:bankick | The ChanServ KICK thing? is that suppose to be AKICK? if so you can make the bot remove the akick as well as the channel ban it places.  _________________ TCL the misunderstood |
|
| Back to top |
|
 |
blake Master
Joined: 23 Feb 2009 Posts: 201
|
Posted: Sun Nov 29, 2009 1:05 pm Post subject: |
|
|
No just need the bot to set mode +b user message chanserv kick command so chanserv kicks out
_-4:53pm-_ * Botnick sets mode: +b Training_Drone1!*@*
_-4:53pm-_ * Training_Drone1 was kicked by testnetwork (You were banned from #TrainingRoom for impersonating a member of staff (15 minutes) (Issued By test)
the above is how it does it at the moment your script will enable us to use timed bans of 15 30 and 1 hour bans
Works a treat thanks TCL_no_TK appreciate it _________________ Blake
UKEasyHosting UKStormWatch |
|
| Back to top |
|
 |
|