Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # NOTICE: Do not copy and paste unless you know what you are doing. /me *grins* :}
- # Done by Kyros Koh (i.am@kyroskoh.com)
- # 13:05:34 <Kyros> .join = join a channel
- # 13:05:40 <Kyros> .part = part a channel
- # 13:05:43 <Kyros> .chattr
- # 13:05:52 <Kyros> .adduser
- # eggdrop 1.6.19
- bind pub m .join pub_join
- bind pub m .part pub_part
- bind pub m .chattr pub_chattr
- bind pub m .adduser pub_adduser
- bind pub m .save pub_save
- bind pub n .rehash pub_rehash
- bind pub n .restart pub_restart
- bind pub m .uptime pub_uptime
- bind pub m .info pub_info
- bind pub m .say pub_say
- bind pub m .msg pub_msg
- bind pub m .voice pub_voice
- bind pub m .devoice pub_devoice
- bind pub m .act pub_act
- proc pub_join {n u h c a} {
- set chan [lindex $a 0]
- if {![string match #* $chan]} {
- puthelp "privmsg $c :$n: Channel must have a # in front."
- return 0
- }
- channel add $chan
- puthelp "NOTICE $n :0,1 Hold on, while i park in..."
- }
- proc pub_part {n u h c a} {
- set chan [lindex $a 0]
- if {![validchan $chan]} {
- puthelp "NOTICE $n :0,1 That channel doesn't exist!"
- return 0
- }
- if {![isdynamic $chan]} {
- puthelp "NOTICE $n :0,1 That channel isn't dynamic!"
- return 0
- }
- channel remove $chan
- }
- proc pub_chattr {n u h c a} {
- set handle [lindex $a 0]
- set flags [lindex $a 1]
- if {![validuser $handle]} {
- puthelp "NOTICE $n :0,1 That handle doesn't exist!"
- return 0
- }
- if {$flags == ""} {
- puthelp "NOTICE $n :0,1 Syntax: .chattr <handle> <+|-><flags>"
- return 0
- }
- chattr $handle $flags
- puthelp "NOTICE $n :0,1 It will be done..."
- }
- proc pub_adduser {n u h c a} {
- set handle [lindex $a 0]
- set hostmask [lindex $a 1]
- if {[validuser $handle]} {
- puthelp "NOTICE $n :0,1 That handle already exists!"
- return 0
- }
- if {$hostmask == ""} {
- set host [getchanhost $handle]
- if {$host == ""} {
- puthelp "NOTICE $n :0,1 I can't get $handle's host."
- puthelp "NOTICE $n :0,1 Syntax: .adduser <handle> <hostmask (nick!user@host) wildcard acceptable>
- return 0
- }
- else {
- adduser $handle *!$host
- puthelp "NOTICE $n :0,1 It will be done..."
- }
- }
- else {
- adduser $handle $hostmask
- puthelp "NOTICE $n :0,1 It will be done..."
- }
- }
- proc pub_save {n u h c a} {
- puthelp "NOTICE $n :0,1 It will be done..."
- save
- }
- proc pub_rehash {n u h c a} {
- puthelp "NOTICE $n :0,1 It will be done..."
- rehash
- }
- proc pub_restart {n u h c a} {
- puthelp "NOTICE $n :0,1 It will be done..."
- restart
- }
- proc pub_uptime {n u h c a} {
- global uptime
- set uu [unixtime]
- set tt [incr uu -$uptime]
- puthelp "privmsg $c :$n: My uptime is [duration $tt]."
- }
- proc pub_info {n u h c a} {
- if {$a == "none"} {
- setuser $h info ""
- puthelp "NOTICE $n :0,1 It will be done..."
- }
- if {$a != "none" && $a != ""} {
- setuser $h info $a
- puthelp "NOTICE $n :0,1 It will be done..."
- }
- if {$a == ""} {
- if {[getuser $h info] == ""} {
- puthelp "NOTICE $n :0,1 You don't have an info."
- return 0
- }
- puthelp "NOTICE $n :0,1 Your info is: [getuser $h info]"
- }
- }
- proc pub_say {n u h c a} {
- putserv "privmsg $c :$a"
- }
- proc pub_msg {n u h c a} {
- set target [lindex $a 0]
- set text [string trimleft $a "$target "]
- putserv "privmsg $target :$text"
- }
- proc pub_voice {n u h c a} {
- pushmode $c +vvvvvv $a
- }
- proc pub_devoice {n u h c a} {
- pushmode $c -vvvvvv $a
- }
- proc pub_act {n u h c a} {
- putserv "privmsg $c :ACTION $a"
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement