egghelp.org community Forum Index
[ egghelp.org home | forum home ]
egghelp.org community
Discussion of eggdrop bots, shell accounts and tcl scripts.
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Helpdesk?

 
Post new topic   Reply to topic    egghelp.org community Forum Index -> Script Requests
View previous topic :: View next topic  
Author Message
speechles
Revered One


Joined: 26 Aug 2006
Posts: 1398
Location: emerald triangle, california (coastal redwoods)

PostPosted: Mon Mar 17, 2008 1:14 am    Post subject: Reply with quote

Code:
# -> trigger
set waffles(cmd) "!admin"

# -> Admins list
# can be 1, 2, 3 or 50,000 nicks, there is no limit but your own imagination
# if more than one, seperate each by a single space.
set waffles(list) "admin1 admin2 etc etc"

# -> Message type
# 0 for private message, or 1 for notice
set waffles(type) 1

### end config, changes beyond not advised

bind pub - $waffles(cmd) pub:needadmin

proc pub:needadmin { nick host hand chan arg } {
    global waffles
    if {$waffles(type) == 0} {
        set adtype "PRIVMSG"
    } else {
        set adtype "NOTICE"
    }
    if {$arg != ""} {
        set adreason " Reason: [join [lrange [split $arg] 0 end]]"
    } else {
        set adreason ""
    }
    foreach ad [split $waffles(list)] {
        if {[onchan $ad]} {
             set flagtrap 1
             # puthelp is used here because (potentially) we jested above
             # about putting 50,000 nicks, some people may take that
             # seriously. puthelp queue can handle it without flooding bot.
             # changing this to putquick or putserv is ill advised.
             puthelp "$adtype $ad :\002$nick\002 requires assistance from an admin on $chan.$adreason"
        }
    }
    if {[info exists flagtrap]} {
        putserv "$adtype $nick :$nick, your request has been sent to the admins, please wait for assistance."
    } else {
        putserv "$adtype $nick :Sorry $nick, the admins are unavailable at this time. Try again later."
    }
}

In English. I've also added an option for privmsg or notice. As well as the ability for users to give a help reason.

With message type 1, notice, it would work like this...
someone types: <nick> !admin
you would see: -bot- nick requires assistance from an admin on #channel.
someone types: <nick> !admin i need help with my friend getting unbanned please
you would see: -bot- nick requires assistance from admin on #channel. Reason: need help with my friend getting unbanned please
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    egghelp.org community Forum Index -> Script Requests All times are GMT - 4 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Forum hosting provided by Reverse.net

Powered by phpBB © 2001, 2005 phpBB Group
subGreen style by ktauber