This is the new home of the egghelp.org community forum.
All data has been migrated (including user logins/passwords) to a new phpBB version.


For more information, see this announcement post. Click the X in the top right-corner of this box to dismiss this message.

public oper commands

Requests for complete scripts or modifications/fixes for scripts you didn't write. Response not guaranteed, and no thread bumping!
Post Reply
z
zemic
Voice
Posts: 1
Joined: Mon Feb 14, 2011 9:07 am

public oper commands

Post by zemic »

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.
b
blake
Master
Posts: 201
Joined: Mon Feb 23, 2009 9:42 am
Contact:

Post by blake »

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: Select all


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: Select all

#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: Select all

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" 
} 
Post Reply