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.
Old posts that have not been replied to for several years.
Real
Voice
Posts: 24 Joined: Mon Mar 08, 2004 11:27 am
Post
by Real » Sat Apr 10, 2004 11:17 am
First problem:
everybody in the channel can execute the !op command, however I stated in my script that only ops can use it. How is this possible?
Code: Select all
bind pub - !op pub_op
proc pub_op {nick mask hand chan text} {
foreach user [chanlist $chan] {
if {[isop $user $chan]} {
set opname "[lindex $text 0]"
if {$opname != ""} {
pushmode $chan +o $opname }
}
}
}
Thank you
Sir_Fz
Revered One
Posts: 3794 Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:
Post
by Sir_Fz » Sat Apr 10, 2004 11:43 am
use this code:
Code: Select all
bind pub - !op pub_op
proc pub_op {nick mask hand chan text} {
if {[isop $nick $chan]} {
set opname "[lindex [split $text] 0]"
if {$opname != ""} {
pushmode $chan +o $opname
}
}
}
Ofloo
Owner
Posts: 953 Joined: Tue May 13, 2003 1:37 am
Location: Belguim
Contact:
Post
by Ofloo » Sat Apr 10, 2004 12:09 pm
is this a script to op urself or someone else on the channel cause if it is a script to op somone else then it should work cause ur opped .. but if it is to op urself then just do bindn pub o .. and remove the isop and the check up if first argument is emty..
if it is opme eh cause i think its a strange question when u ask that how it could be that u need to op someone when are checking if ur opped to me this means ur not opped this can only mean that ur not opped and probably are trying to oper urself if its to op someone else without u being opped witch i think is strange then do the same as the previous script but remove the isop and bind to o like it is done below remember that ur eggdrop needs global or channel flags +o
Code: Select all
bind pub o|o !opme opme:pub
proc opme:pub {nick uhost hand chan arg} {
if {[botisop $chan] && ![isop $nick $chan]} {
pushmode $chan +o $nick
}
}
XplaiN but think of me as stupid
Real
Voice
Posts: 24 Joined: Mon Mar 08, 2004 11:27 am
Post
by Real » Sun Apr 11, 2004 7:04 am
Ok thank you, I fixed the problem
Now there's another small issue
Code: Select all
bind pub - !deop pub_deop
set botname "Botbot"
proc pub_deop {nick mask hand chan text} {
global botname
if {[isop $nick $chan]} {
set deopname "[lindex $text 0]"
if {[string match -nocase $deopname $botname]} {
putserv "PRIVMSG $chan :You can't deop $botname !"
return }
if {$deopname == ""} {
pushmode $chan -o $nick }
if {$deopname != ""} {
pushmode $chan -o $deopname }
}
}
This still deops the bot when using
!deop Botbot
Why is this?
dollar
Op
Posts: 178 Joined: Tue Oct 28, 2003 3:47 pm
Location: Netherlands
Post
by dollar » Sun Apr 11, 2004 12:13 pm
Try this (untested):
Code: Select all
bind pub - !deop pub_deop
proc pub_deop {nick mask hand chan text} {
if {[isop $nick $chan]} {
set deopname [lindex [split $text] 0]
if {[isbotnick $deopname]} {
putserv "PRIVMSG $chan :You can't deop $::botnick!"
return 0
}
if {$deopname == ""} {
pushmode $chan -o $nick
} else {
pushmode $chan -o $deopname
}
}
}
dollar (or something similar) at:
#eggdrop / #tcl - undernet
#egghelp / #tcl / #eggtcl - efnet
#eggdrop.support / #tcl - quakenet
#eggdrop - ircnet