Citat:
nickola_sd: I meni treba jedna skripta, tacnije TCL skripta pomocu koje se mogu koristiti komande tipa !op, !deop, !kick ... ali da komande mogu da koriste samo oni sa access liste! Vec sam skinuo desetak i samo jedna radi, ali tada bot slusa bukvalno svakog usera na kanalu. :)) Skripta mi treba za irc.krstarica.com!
Evo ti "public.tcl":
Code:
## Public Commands v.1.2 by kurupt . The bot listen to "!" "`" "." and no char command
## Special thanks to #eggdrop team and aqwzxs ; mc_8 ; slennox ;
## For sugestions and bugs contact me on Undernet channel #eggdrop or #strand
## or send me a mail at dpgc@purehype.net
## VARIABILES
set settings(cmdpfix1) "."
set settings(cmdpfix2) "!"
set settings(cmdpfix3) "`"
proc kbindk {flags cmd proc} {
global settings
bind pub $flags ${settings(cmdpfix1)}${cmd} $proc
bind pub $flags ${settings(cmdpfix2)}${cmd} $proc
bind pub $flags ${settings(cmdpfix3)}${cmd} $proc
bind pub $flags ${cmd} $proc
}
## BINDS
kbindk of|f uptime uptime
kbindk of|f op op
kbindk of|f deop deop
kbindk of|f voice voice
kbindk of|f hop hop
kbindk of|f dehop dehop
kbindk of|f devoice devoice
kbindk om|o ban ban
kbindk om|o mb mb
kbindk om|o unbab deban
kbindk om|o kick kick
kbindk om|o kb kickban
kbindk m|onfm say say
kbindk m|onfm invite invite
kbindk - version version
kbindk mn chattr chatt_r
kbindk n|ofnm handle ch_handle
kbindk mn save sa_ve
kbindk mn reload re_load
kbindk mn rehash rehash_bot
kbindk mn restart restart_bot
kbindk mn die die_exit
kbindk mn|- help help
## SETTINGS
proc uptime {nik uhost handle mix text} {
global uptime {server-online};
foreach chan $mix {
putserv "privmsg $chan :\0031 UPTIME:\0032 [duration [expr [unixtime] - $uptime]],\0031 ON-LINE\0032 [duration [expr [unixtime] - ${server-online}]]"
}
return "..." }
proc version {nik uhost hand chn txt} {
putserv "privmsg $chn :\0032Public commands \0034v.1.2\0031 by\0032 kurupt"
}
proc say {nik uhost hand chn txt} {
set nick [lindex $txt 0]
set tex [lrange $txt 1 end]
putserv "privmsg $nick :$tex"
}
proc op {nik uhost hand chn txt} {
set nick [lindex $txt 0]
if {$nick != ""}\
{putserv "mode $chn +o $nick" -next
} else {putserv "mode $chn +o $nik" -next}
}
proc deop {nik uhost hand chn txt} {
set nick [lindex $txt 0]
if {$nick != ""} {putserv "mode $chn -o $nick" -next
} else {putserv "mode $chn -o $nik" -next}
}
proc voice {nik uhost hand chn txt} {
set nick [lindex $txt 0]
if {$nick != ""} {putserv "mode $chn +v $nick" -next}\
else {putserv "mode $chn +v $nik" -next}
}
proc hop {nik uhost hand chn txt} {
set nick [lindex $txt 0]
if {$nick != ""} {putserv "mode $chn +h $nick" -next}\
else {putserv "mode $chn +h $nik" -next}
}
proc voiceme {nik uhost hand chn txt} {
putserv "mode $chn +v $nik"
}
proc devoice {nik uhost hand chn txt} {
set nick [lindex $txt 0]
if {$nick != ""} {putserv "mode $chn -v $nick" -next}\
else {putserv "mode $chn -v $nik" -next}
}
proc dehop {nik uhost hand chn txt} {
set nick [lindex $txt 0]
if {$nick != ""} {putserv "mode $chn -h $nick" -next}\
else {putserv "mode $chn -h $nik" -next}
}
proc devoiceme {nik uhost hand chn txt} {
putserv "mode $chn -v $nik" -next
}
proc ban {nik uhost hand chn txt} {
set nick [lindex $txt 0]
set host [getchanhost $nick]
putserv "mode $chn +b $host" -next
}
proc mb {nik uhost hand chn txt} {
set mask [lindex $txt 0]
putserv "mode $chn +b $mask" -next
}
proc kickban {nik uhost hand chn txt} {
set nick [lindex $txt 0]
set reas [lrange $txt 1 end]
set host [getchanhost $nick]
if {![string length [string trim $reas]]} {
set reas "banned by \[${hand}/\002${nik}\002] - No reason specified"} else {
set reas "banned by \[${hand}/\002${nik}\002] - $reas"}
putserv "mode $chn +b $host"
putserv "kick $chn $nick $reas"
}
proc kick {nik uhost hand chn txt} {
set nick [lindex $txt 0]
set reas [lrange $txt 1 end]
if {![string length [string trim $reas]]} {
set reas "\[${hand}/\002${nik}\002] - No reason specified"} else {
set reas "\[${hand}/\002${nik}\002] - $reas"}
putserv "kick $chn $nick $reas"
}
proc deban {nik uhost hand chn txt} {
set mask [lindex $txt 0]
putserv "mode $chn -b $mask"
putserv "privmsg $chn :$nik UNBANNED: $mask"
}
proc invite {nik uhost hand chn txt} {
set nick [lindex $txt 0]
set chan [lindex $txt 1]
if {$chan == ""} {set chan $chn}
putserv "invite $nick $chan"
putserv "privmsg $chn :$nik \0031Inviting \0032$nick\0031 to \0032$chan"
}
proc bot_list {nik uhost hand chn txt} {
set botl [botlist]
putserv "privmsg $chn :$botl"
}
proc chatt_r {nik uhost hand chn txt} {
set nick [lindex $txt 0]
set change [lindex $txt 1]
set chan [lindex $txt 2]
if {$chan == ""} {set chattz [chattr $hand $change]; chattr $hand $change
} else {set chattz [chattr $hand |$change $chan]; chattr $hand |$change $chan
}
if {$chan == ""} {putserv "privmsg $chn :\0031The global flags for \0032$nik\0031 with handle \0034$hand\0031 are now: \0034$chattz"
} else {putserv "privmsg $chn :\0031Global flags, and \0032$chan\0031 flags in the format of \0032global|#chan\0031 for $nick are now:\0034 $chattz"
}
}
proc ch_handle {nik uhost hand chn txt} {
set nick [lindex $txt 0]
set nick1 [lindex $txt 1]
set handl [chhandle $nick $nick1]
chhandle $nick $nick1
if {$handl == 1} {putserv "privmsg $chn :\0031Successfully changed user: \0032$nick \0031to user: \0032$nick1"
} else {putserv "privmsg $chn :\0031Error, either an unknown user, or the selected username is already in use.Use \0032!handle\0034 <old-handle> <new-handle>"
}
}
proc die_exit {nik uhost hand chn txt} {
exit
}
proc sa_ve {nik uhost hand chn txt} {
save
putserv "privmsg $chn :\0032The user and channel files have successfully been written to disk."
}
proc re_load {nik uhost hand chn txt} {
reload
putserv "privmsg $chn :\0032The user file has been successfully re-loaded."
}
proc rehash_bot {nik uhost hand chn txt} {
global botnick; rehash
putserv "privmsg $chn :\0032Rehash successful."
}
proc restart_bot {nik uhost hand chn txt} {
restart
}
proc help {nik uhost hand chn txt} {
putserv "privmsg $chn :For Help Contact The Author at\0032 dpgc@purehype.net"
}
putlog "\0032Public commands\0034 v.1.2\0031 by\0032 kurupt"
Citat:
Danilo Cvjeticanin:
www.mircscipts.com
www.yumirc.com
Nacete dosta dobrih bot scripti...Mada najbolje resenje je shell i eggdrop te skripte su jako lose dobro je sto se lako konfigurisu a ostalo shit..Reci koja je skripta u pitanju!?
www.yumirc.com neradi...