| View previous topic :: View next topic |
| Author |
Message |
zemic Voice
Joined: 14 Feb 2011 Posts: 1
|
Posted: Mon Feb 14, 2011 10:02 am Post subject: public oper commands |
|
|
Im in need of a script that lets people to use public irc operator commands to change their vhost and get op in a channel. Server is running unrealircd.
Commands could be !vhost and !opme. I guess right oper commands are chghost and samode. Op command would give user op in the channel the command has been used and script should work in all channels the bot is on. !opme command could also work as msg to the bot.
And finally how can i make the bot to take oper rights when joining a server?
Thanks for help. |
|
| Back to top |
|
 |
blake Master
Joined: 23 Feb 2009 Posts: 201
|
Posted: Tue Feb 15, 2011 10:53 am Post subject: |
|
|
In your eggdrop.conf look for this section
# This is a Tcl script to be run immediately after connecting to a server.
bind evnt - init-server evnt:init_server
change it to the following to oper your eggdrop
| Code: |
bind evnt - init-server evnt:init_server
proc evnt:init_server {type} {
putquick "privmsg nickserv identify password"
putquick "OPER NICKNAME OERPASS"
}
|
The following will op and set vhosts this could do with some protection checks on it im sure someone will add to it
| Code: | #This part will allow you to add channels you dont want this command to work in channels can be added
#like so people with global flag n overide this to use type /msg botnick opme #channelname
#set channels {
#"#addchannel"
#"#addchannel"
#} |
| Code: | set channels {
"#addchannel"
}
bind msg o|o opme cmd:opme
proc cmd:opme {nick uhost hand arg} {
global channels
set chan [lindex [split $arg] 0]
foreach c $channels {
if {!([matchattr $hand n|n $chan]) && [string match -nocase $c $chan]} {
return 0
}
}
putserv "PRIVMSG CHANSERV OP $chan $nick"
}
#!vhost to use type !vhost your.virtual.host in a channel
bind pub o|o !vhost vhost_proc
proc vhost_proc {nick uhost hand chan arg} {
set text [lindex [split $arg] 0]
putserv "PRIVMSG HOSTSERV SET $nick $text"
}
|
_________________ Blake
UKEasyHosting UKStormWatch |
|
| Back to top |
|
 |
|