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 

public oper commands

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


Joined: 14 Feb 2011
Posts: 1

PostPosted: Mon Feb 14, 2011 10:02 am    Post subject: public oper commands Reply with quote

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
View user's profile Send private message
blake
Master


Joined: 23 Feb 2009
Posts: 201

PostPosted: Tue Feb 15, 2011 10:53 am    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
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