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.
metroid
Owner
Posts: 771 Joined: Wed Jun 16, 2004 2:46 am
Post
by metroid » Sun Jul 04, 2004 1:27 pm
Code: Select all
bind mode - "+o" op:nick
bind mode - "*+o*" op:nick
proc op:nick {nick uhost hand chan mode} {
if {$mode == "+o"} {
if {$nick == "$botnick" || [matchattr $nick "o"]) {
putserv "PRIVMSG $chan :Why thank you $nick"
} else {
putquick "MODE $chan -o $botnick"
putserv "PRIVMSG $chan :Please do not op me $nick"
}
}
}
}
It doesnt seem to work...
It might seem like a strange script but i want the bot to only be opped by people in its userlist.
So if it gets opped by someone else, it deops itself, but the code here doesnt seem to work
-edit : Can someone fix it?
Last edited by
metroid on Sun Jul 04, 2004 1:47 pm, edited 1 time in total.
metroid
Owner
Posts: 771 Joined: Wed Jun 16, 2004 2:46 am
Post
by metroid » Sun Jul 04, 2004 1:47 pm
Gah, i need this to be fixed
Aron
Halfop
Posts: 86 Joined: Sat Mar 15, 2003 8:35 am
Post
by Aron » Sun Jul 04, 2004 2:16 pm
Processes triggered by "bind mode" have the following form:
Code: Select all
proc-name {nick host hand chan mode victim} { }
You forgat the victim.
The person being opped is the victim, in this case.
The best way to start learning is to start helping.
metroid
Owner
Posts: 771 Joined: Wed Jun 16, 2004 2:46 am
Post
by metroid » Sun Jul 04, 2004 5:00 pm
[23:01] Tcl error [op:nick]: syntax error in expression "$nick == "$::botnick" || [matchattr $nick o]) {
[23:01:09] <sheeptest> putserv "PRI...": extra tokens at end of expression
:E
greenbear
Owner
Posts: 733 Joined: Mon Sep 24, 2001 8:00 pm
Location: Norway
Post
by greenbear » Sun Jul 04, 2004 5:08 pm
try something like this:
Code: Select all
if {($nick == $::botnick) || ([matchattr $hand o])} {
Alchera
Revered One
Posts: 3344 Joined: Mon Aug 11, 2003 12:42 pm
Location: Ballarat Victoria, Australia
Contact:
Post
by Alchera » Sun Jul 04, 2004 5:14 pm
Code: Select all
if {$nick == "$botnick" || [matchattr $nick "o"]) {
Change to (as
gb posted):
Code: Select all
if {($nick == $::botnick) || ([matchattr $hand o])} {
Notice absence of quotation marks and also notice the right brace you missed putting in.
Add [SOLVED] to the thread title if your issue has been.
Search |
FAQ |
RTM
awyeah
Revered One
Posts: 1580 Joined: Mon Apr 26, 2004 2:37 am
Location: Switzerland
Contact:
Post
by awyeah » Sun Jul 04, 2004 11:30 pm
Here give this a try, it should work.
Code: Select all
bind mode - "*+o*" op:nick
proc op:nick {nick uhost hand chan mode target} {
global botnick
if {($mode == "+o") && ($target == $botnick)} {
if {([matchattr $hand o])} {
putserv "PRIVMSG $chan :Why thank you $nick!"
}
if {(![matchattr $hand o])} {
putquick "MODE $chan -o $botnick"
putserv "PRIVMSG $chan :Please do not op me $nick!"
}
}
}
·awyeah·
==================================
Facebook: jawad@idsia.ch (Jay Dee)
PS: Guys, I don't accept script helps or requests personally anymore.
==================================
metroid
Owner
Posts: 771 Joined: Wed Jun 16, 2004 2:46 am
Post
by metroid » Mon Jul 05, 2004 2:47 am
Ill put it in right now, and see if it works
metroid
Owner
Posts: 771 Joined: Wed Jun 16, 2004 2:46 am
Post
by metroid » Mon Jul 05, 2004 3:06 am
Works perfectly
Thanks for fixing it
awyeah
Revered One
Posts: 1580 Joined: Mon Apr 26, 2004 2:37 am
Location: Switzerland
Contact:
Post
by awyeah » Mon Jul 05, 2004 1:37 pm
When I make it, it always has to work!
·awyeah·
==================================
Facebook: jawad@idsia.ch (Jay Dee)
PS: Guys, I don't accept script helps or requests personally anymore.
==================================
dollar
Op
Posts: 178 Joined: Tue Oct 28, 2003 3:47 pm
Location: Netherlands
Post
by dollar » Mon Jul 05, 2004 3:17 pm
Why doesn't anyone use isbotnick?
dollar (or something similar) at:
#eggdrop / #tcl - undernet
#egghelp / #tcl / #eggtcl - efnet
#eggdrop.support / #tcl - quakenet
#eggdrop - ircnet
Alchera
Revered One
Posts: 3344 Joined: Mon Aug 11, 2003 12:42 pm
Location: Ballarat Victoria, Australia
Contact:
Post
by Alchera » Mon Jul 05, 2004 6:25 pm
I do.
/me puts hand up
Add [SOLVED] to the thread title if your issue has been.
Search |
FAQ |
RTM
caesar
Mint Rubber
Posts: 3778 Joined: Sun Oct 14, 2001 8:00 pm
Location: Mint Factory
Post
by caesar » Tue Jul 06, 2004 10:24 am
$target == $botnick is not necesarly correct cos foo is not equal with FOO or FoO and so on, so either "string tolower" them or use "string equal -nocase $target $botnick"
This has been discussed 100 times before, why don't you understand it once and for all?
Once the game is over, the king and the pawn go back in the same box.
dollar
Op
Posts: 178 Joined: Tue Oct 28, 2003 3:47 pm
Location: Netherlands
Post
by dollar » Tue Jul 06, 2004 1:46 pm
caesar wrote: $target == $botnick is not necesarly correct cos foo is not equal with FOO or FoO and so on, so either "string tolower" them or use "string equal -nocase $target $botnick"
This has been discussed 100 times before, why don't you understand it once and for all?
String equal BAAAAD, isbotnick GOOOOD!
dollar (or something similar) at:
#eggdrop / #tcl - undernet
#egghelp / #tcl / #eggtcl - efnet
#eggdrop.support / #tcl - quakenet
#eggdrop - ircnet
caesar
Mint Rubber
Posts: 3778 Joined: Sun Oct 14, 2001 8:00 pm
Location: Mint Factory
Post
by caesar » Tue Jul 06, 2004 2:06 pm
I was kinda talking in general.
I haven't mentioned nothing about the isbotnick cos you've done it before me so there was no point on repeating the same thing, I just pointed out that thre is a BIG difference and should be taken in consideration.
Last edited by
caesar on Tue Jul 06, 2004 2:08 pm, edited 1 time in total.
Once the game is over, the king and the pawn go back in the same box.