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.

How to detect SOP (&nick) in Unreal ircd

Old posts that have not been replied to for several years.
User avatar
AUTIST
Voice
Posts: 20
Joined: Sun Feb 01, 2004 8:52 am

Post by AUTIST »

Let me explain, you used next (testing only for 'q' flag):

Code: Select all

bind mode - * moo 
proc moo {n u h c m v} { 
   switch -- $m { 
    "+q" {lappend ::owns($c) $v
		   putlog "+own $::owns($c)"
		} 
   "-q" {if {[info exists ::owns($c)] && [set i [lsearch -exact $::owns($c) $v]] != -1} { 
		  putlog "-own $::owns($c) $i"
		  set ::owns($c) [lreplace $::owns($c) $i $i]
		 putlog "-own $::owns($c)"
      }} 
   } 
} 
I am on a channel with +q flag (~) only.
The bot is coming to the channel and make the list owns with only one element AUTIST.
The I changed the mode:
Mode(AUTIST) sets (-q AUTIST)
Bot loggin into console:
[14:53] -own AUTIST {} 1
[14:53] -own AUTIST
The second log it's is a list after deleteing me. Why I am still in the list?

Also, the same situation but I am not a ChanOwner (have not +q)
The owns list is empty when bot joining a channel.
Then I ask chanserv to make me owner:
Mode(ChanServ) sets (+q FREEK)
The bot should add me to a own list.
But in console the list is still empty....
[15:02] +own {}
Can you help me to resolve this? :shock:
User avatar
demond
Revered One
Posts: 3073
Joined: Sat Jun 12, 2004 9:58 am
Location: San Francisco, CA
Contact:

Post by demond »

I suspect this happens because of eggdrop's inability to properly handle modes that it doesn't support (chanmodes are hardcoded in eggdrop); in this case, parameter $v is obviously empty, and it shouldn't be empty

try to substitute [bind mode] with [bind raw], your raw proc will need to handle MODE lines; check tcl-commands.doc on info how to do that; if you are stuck, ask for help
User avatar
AUTIST
Voice
Posts: 20
Joined: Sun Feb 01, 2004 8:52 am

Post by AUTIST »

Big thanks! It works with bind RAW
Locked