Asked r0t3n to make this for me a while ago.
Usage;
-out nick ?reason/preset?
You can change all the presets by opening the script in a scripteditor.
Find the line "array set preset {" and add by this format: {name} {value} .
Name will be the preset name, and value is the kickmessage.
For example, if I set the name as "noob" and the kickmessage as "You f*cking noob".. I'll show you.
<zNigel-> -out r0t3n noob
r0t3n was kicked by Bot <You f*cking noob - ID: 1337>
ID's will be shown automatically, so there is no need to add ID in preset kickmessage.
Also if you dont use any reason or preset, it will take the default one which is "You are OUT!"
All bans are 2min bans but can be changed at the variable "Bantime"
Triggers can also be changed. Just go to the variable "trigger" and change it to whatever you want.
Another example:
<zNigel-> -out r0t3n
r0t3n was kicked by Bot <You are OUT! - ID: 1338>
Here goes the script:
- Code: Select all
namespace eval out {
variable version "1.02"
variable author "r0t3n aka blap"
variable script "[lindex [split [info script] /] end]"
variable trigger "-out"
variable flags "m|m"
variable bantime "120"; # in seconds
if {[array exists preset]} { array unset preset }
# format: {name} {value}
array set preset {
{spam} {Spam detected! User shutdown...}
{default} {You are OUT!}
}
setudef int out_kid
bind pub $flags "$trigger" [namespace current]::out
proc out {nickname hostname handle channel text} {
global lastbind botnick
if {$text == ""} {
putserv "NOTICE $nickname :SYNTAX: $lastbind <nick> ?reason/preset?."
} elseif {![onchan [set who [lindex [split $text] 0]] $channel]} {
putserv "NOTICE $nickname :'$who' is not on $channel."
} else {
set reason [join [lrange $text 1 end]]
if {$reason == ""} {
set reason "[join $out::preset(default)]"
} elseif {[info exists out::preset([string tolower $reason])]} {
set reason "[join $out::preset([string tolower $reason])]"
}
if {[string match -nocase *users.quakenet.org [set banmask *!*[string trimleft [getchanhost $who $channel] ~]]]} {
set banmask *!*@[lindex [split $banmask @] 1]
}
channel set $channel out_kid "[set kid [expr {[channel get $channel out_kid]+1}]]"
append reason "- ID: $kid"
putquick "MODE $channel +b $banmask"
putquick "KICK $channel $who :$reason"
utimer $out::bantime [list pushmode $channel -b $banmask]
putserv "NOTICE $nickname :Done. User '$who' is now banned for $out::bantime seconds."
}
}
putlog "<$script> Version: $version Author: $author loaded."
}
Also if anyone would be very nice, a convert to MSL would be appreciated.