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.

Channel desync mode help pls

Old posts that have not been replied to for several years.
Locked
I
Illidan
Voice
Posts: 27
Joined: Sat Oct 26, 2002 1:49 am

Channel desync mode help pls

Post by Illidan »

Hi,

Take a look at this

[13:44] *** Panda sets mode: +o Desto
[13:44] *** irc.server.net sets mode: -o Desto

irc.server.net is a irc server and whenever my bot op someone the server will auto-deop it. I want to create a simple bind raw to it so that when the irc server deop the user, my bot knows that it need a cycle of channel.

How do we bind it?

Thanks
p
ppslim
Revered One
Posts: 3914
Joined: Sun Sep 23, 2001 8:00 pm
Location: Liverpool, England

Post by ppslim »

There is no need to use a RAW bind.

You can use the MODE bind. This is documented in tcl-commands.doc.
I
Illidan
Voice
Posts: 27
Joined: Sat Oct 26, 2002 1:49 am

Post by Illidan »

so is my coding right this way?

set spam-leaf-file "/usr/home/deron/eggdrop/leafspam"

bind mode - "-o" do_cycle
bind mode - "-l" do_cycle

proc do_cycle {nick uhost hand chan mode victim} {
set chan [string tolower $chan]
set uhost [string tolower $uhost]
if {$nick == "" && uhost == "*.services.org" && $victim == "$botnick"} {
putserv "PART $chan"
putserv "JOIN $chan"
set file [open ${spam-leaf-file} a+]
puts $file $data
close $file
}
}
Locked