i have this script her what do i need to change so my staff can use the functions as weel at the moment i am the only who can use them...?
Code: Select all
# opers tcl version1.0
# techie
# http://www.linuxirc.com
bind pub o !h pub:h
bind pub o !c pub:c
bind pub o !op pub:op
bind pub o !vo pub:vo
bind pub o !devo pub:devo
bind pub o !k pub:kick
bind pub o !b pub:ban
bind pub o !ub pub:ub
bind pub o !kb pub:kb
bind pub o !hop pub:hop
bind pub o !dehop pub:dehop
bind pub o !t pub:topic
bind pub - !p pub:p
bind pub n !jump pub:jump
bind pub n !die pub:die
bind pub o !status pub:status
bind pub o !broadcast pub:broadcast
bind pub o !deop pub:deop
bind pub o !info pub:info
proc pub:h {nick uhost hand chan text} {
puthelp "NOTICE $nick :!c !op !deop !hop !dehop !vo !devo !k !b !ub !kb !t !p !info !jump !die !status
!broadcast"
}
proc pub:c {nick uhost hand chan text} {
if {[botisop $chan] == 1} {
if {[isop $nick $chan] == 1} { pushmode $chan -o $nick } else { pushmode $chan +o $nick }
} else { puthelp "NOTICE $nick :i dont have ops!" }
}
proc pub:op {nick uhost hand chan text} {
if {[botisop $chan] == 1} {
if {[string length $text] > 0} {
set tnick [lindex $text 0]
if {[onchan $tnick $chan]} {
if {[onchan $tnick $chan]} { pushmode $chan +o $tnick }
} else { puthelp "NOTICE $nick :no such nick on channel!" }
} else { puthelp "NOTICE $nick :usage !op <nick> - ops a nick" }
} else { puthelp "NOTICE $nick :i dont have ops!" }
}
proc pub:deop {nick uhost hand chan text} {
if {[botisop $chan] == 1} {
if {[string length $text] > 0} {
set tnick [lindex $text 0]
if {[onchan $tnick $chan]} {
if {[onchan $tnick $chan]} { pushmode $chan -o $tnick }
} else { puthelp "NOTICE $nick :no such nick on channel!" }
} else { puthelp "NOTICE $nick :usage !deop <nick> - deop a nick" }
} else { puthelp "NOTICE $nick :i dont have ops!" }
}
proc pub:vo {nick uhost hand chan text} {
if {[botisop $chan] == 1} {
if {[string length $text] > 0} {
set tnick [lindex $text 0]
if {[onchan $tnick $chan]} {
if {[onchan $tnick $chan]} { pushmode $chan +v $tnick }
} else { puthelp "NOTICE $nick :no such nick on channel!" }
} else { puthelp "NOTICE $nick :usage !vo <nick> - voices a nick" }
} else { puthelp "NOTICE $nick :i dont have ops!" }
}
proc pub:devo {nick uhost hand chan text} {
if {[botisop $chan] == 1} {
if {[string length $text] > 0} {
set tnick [lindex $text 0]
if {[onchan $tnick $chan]} {
if {[onchan $tnick $chan]} { pushmode $chan -v $tnick }
} else { puthelp "NOTICE $nick :no such nick on channel!" }
} else { puthelp "NOTICE $nick :usage !devo <nick> - devoices a nick" }
} else { puthelp "NOTICE $nick :i dont have ops!" }
}
proc pub:hop {nick uhost hand chan text} {
if {[botisop $chan] == 1} {
if {[string length $text] > 0} {
set tnick [lindex $text 0]
if {[onchan $tnick $chan]} {
if {[onchan $tnick $chan]} { pushmode $chan +h $tnick }
} else { puthelp "NOTICE $nick :no such nick on channel!" }
} else { puthelp "NOTICE $nick :usage !hop <nick> - hop a nick" }
} else { puthelp "NOTICE $nick :i dont have ops!" }
}
proc pub:dehop {nick uhost hand chan text} {
if {[botisop $chan] == 1} {
if {[string length $text] > 0} {
set tnick [lindex $text 0]
if {[onchan $tnick $chan]} {
if {[onchan $tnick $chan]} { pushmode $chan -h $tnick }
} else { puthelp "NOTICE $nick :no such nick on channel!" }
} else { puthelp "NOTICE $nick :usage !dehop <nick> - dehop a nick" }
} else { puthelp "NOTICE $nick :i dont have ops!" }
}
proc pub:kick {nick uhost hand chan text} {
if {[botisop $chan]} {
if {[string length $text] > 0} {
set tnick [lindex $text 0]
if {[string length [lindex $text 1]] == 0} { set reason kicked } else { set reason [lrange $text 1 end] }
if {[onchan $tnick $chan]} { putkick $chan $tnick $reason } else { puthelp "NOTICE $nick :no such nick on channel!" }
} else { puthelp "NOTICE $nick :usage !k <nick> reason - kicks a nick" }
} else { puthelp "NOTICE $nick :i dont have ops!" }
}
proc pub:ban {nick uhost hand chan text} {
if {[botisop $chan]} {
if {[string length $text] > 0} {
set tnick [lindex $text 0]
if {[onchan $tnick $chan]} {
if {[string length [lindex $text 1]] == 0} { set reason banned } else { set reason [lrange $text 1 end] }
newchanban $chan *!*@[lindex [split [getchanhost $tnick $chan] @] 1] $nick $reason 10
} else { puthelp "notice $nick :no such nick on channel!" }
} else { puthelp "NOTICE $nick :usage !b <nick> reason - bans a nick" }
} else { puthelp "NOTICE $nick :i dont have ops!" }
}
proc pub:ub {nick uhost hand chan text} {
if {[botisop $chan]} {
if {[string length $text] > 0} {
set tnick [lindex $text 0]
if {[ischanban $tnick $chan]} { killchanban $chan $tnick } else { puthelp "NOTICE $nick :no such ban on $chan" }
} else { puthelp "NOTICE $nick :usage !ub <nick!user@host> - unbans an address" }
} else { puthelp "NOTICE $nick :i dont have ops!" }
}
proc pub:kb {nick uhost hand chan text} {
if {[botisop $chan]} {
if {[string length $text] > 0} {
set tnick [lindex $text 0]
if {[onchan $tnick $chan]} {
if {[string length [lindex $text 1]] == 0} { set reason banned } else { set reason [lrange $text 1 end] }
newchanban $chan *!*@[lindex [split [getchanhost $tnick $chan] @] 1] $nick $reason 10
utimer 5 [putkick $chan $tnick $reason]
} else { puthelp "notice $nick :no such nick on channel!" }
} else { puthelp "NOTICE $nick :usage !kb <nick> reason - kicks and bans a nick" }
} else { puthelp "NOTICE $nick :i dont have ops!" }
}
proc pub:topic {nick uhost hand chan text} {
if {[botisop $chan]} { putserv "TOPIC $chan :$text" } else { puthelp "NOTICE $nick :i dont have ops!" }
}
proc pub:p {nick uhost hand chan text} { putserv "PRIVMSG $chan :connected!" }
proc pub:jump {nick uhost hand chan text} { jump $text }
proc pub:die {nick uhost hand chan text} { die $text }
proc pub:info {nick uhost hand chan test} { putserv "PRIVMSG $chan :opers.tcl version 1.0" }
proc pub:status {nick uhost hand chan text} {
global server botname version
puthelp "PRIVMSG $chan :user records: [countusers], channels: [channels], date: [date], time: [time], os: [unames], server: $server, host: $botname,egg version: [lindex $version 0]"
}
proc pub:broadcast {nick uhost hand chan text} {
if {[string length $text] > 0} {
set text [string trim $text "{}"]
foreach n [channels] { puthelp "PRIVMSG $n :$text" }
} else { puthelp "NOTICE $nick :!broadcast <message> - sends message to all channels that the bot is" }
}
putlog "tcl: opers tcl loaded"
here is the code
Code: Select all
bind PUB n|- !regnick pub:regnick
proc regnick { nickname hostname handle channel arguments } {
set nick [lindex [split $arguments] 0]
set password [lindex [split $arguments] 1]
set email [lindex [split $arguments] 2]
if {$nick == "" || $password == "" || $email == ""} {
putquick "NOTICE $nickname :Not enough arguments."
return 0
}
if {[string length $password] < 5} {
putquick "NOTICE $nickname :The password isn't long enough"
return 0
}
if {![string match -nocase "*@*" $email]} {
putquick "NOTICE $nickname :Invalid email adress."
return 0
}
##DO YOUR STUFF
}