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.
Callisto
Halfop
Posts: 86 Joined: Sun Mar 13, 2005 11:04 am
Post
by Callisto » Wed May 04, 2005 12:10 pm
Hi and thanks for reading this. I have a script that changes mode +/- s on a chan if my eggie is alone. This is to comply with network policies. However my bot is on more than 1 chan so I would like to make it chan specific, can anyone help? Also this code doesnt run on 1.6.17 can anyone see why?
Many thanks all help appreciated.
Code: Select all
set s_threshold 1
bind join - * {do_the_s_check 0}
bind part - * {do_the_s_check 1}
bind sign - * {do_the_s_check 1}
proc do_the_s_check {off nick uhost hand chan args} {
if {![validchan $chan]||[string match *s* [channel get $chan chanmode]]} return
if {[isbotnick $nick]} {
utimer 5 [list do_the_s_check 0 . . . $chan]
} elseif {[botisop $chan]} {
if {([llength [chanlist $chan]]-$off)>$::s_threshold} {
if {[string match *s* [lindex [getchanmode $chan] 0]]} {
pushmode $chan -s
}
} elseif {![string match *s* [lindex [getchanmode $chan] 0]]} {
pushmode $chan +s
}
}
}
De Kus
Revered One
Posts: 1361 Joined: Sun Dec 15, 2002 11:41 am
Location: Germany
Post
by De Kus » Wed May 04, 2005 5:39 pm
you need to post error messages, I can't see why it shouldn't run under any new Eggdrop.
what do you mean with channel spezific? do you want to check for botisop or just want to exclude some channels?
De Kus
StarZ|De_Kus, De_Kus or DeKus on IRC
Copyright © 2005-2009 by De Kus - published under
The MIT License
Love hurts, love strengthens...
Callisto
Halfop
Posts: 86 Joined: Sun Mar 13, 2005 11:04 am
Post
by Callisto » Wed May 04, 2005 6:28 pm
There are no error messages it just sits there and doesnt work, however I am not too worried as I normally use eggdrop 1.6.16.
As for the specific channel thing yes to only work in some but not all the channels the bot is opped in.
Thanks for the reply
Sir_Fz
Revered One
Posts: 3794 Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:
Post
by Sir_Fz » Wed May 04, 2005 6:43 pm
you can use "#channel *" instaed of * in the binds.
greenbear
Owner
Posts: 733 Joined: Mon Sep 24, 2001 8:00 pm
Location: Norway
Post
by greenbear » Wed May 04, 2005 8:38 pm
the easiest way to add support for multiple chans is to make a channel setting out of it, ie.
Code: Select all
setudef flag scheck
proc do_the_s_check {off nick uhost hand chan args} {
if ![channel get $chan scheck] return
....
then just use .chanset #chan +/-scheck to enable or disable it.
Callisto
Halfop
Posts: 86 Joined: Sun Mar 13, 2005 11:04 am
Post
by Callisto » Thu May 05, 2005 5:52 am
Hi and thanks for all replies. gb? that sounds perfect for my needs but where would I put that bit of code at the start or end of the original code?
many thanks
Sir_Fz
Revered One
Posts: 3794 Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:
Post
by Sir_Fz » Thu May 05, 2005 11:12 am
Look how it's done in gb's code, it's pretty clear.