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 » Wed Aug 11, 2004 6:19 am
I made a small script that changes the chan modes, its really simple but i can't see to figure this out.
Code: Select all
proc pub:modeset {nick uhost hand chan text} {
global lastbind
set chanmodes [lindex [getchanmode $chan] 0]
if {$chanmodes == "+"} {
set chanmodes "No chanmodes set"
} else {
set chanmodes [lindex [getchanmode $chan] 0]}
if {$text == ""} {
putquick "NOTICE $nick :Syntax : $lastbind +/-\[mode\]"
putquick "NOTICE $nick :Current modes set on $chan are: $chanmodes"
} else {
putquick "MODE $chan $text"
putquick "NOTICE $nick :Done."
set chanmodes2 [lindex [getchanmode $chan] 0]
putquick "NOTICE $nick :The current modes set on $chan are now: $chanmodes2"
}
}
When i change a mode, it won't show it in the new list, eventhough its made after the mode change, Plz help me to fix it
Papillon
Owner
Posts: 724 Joined: Fri Feb 15, 2002 8:00 pm
Location: *.no
Post
by Papillon » Wed Aug 11, 2004 7:18 am
try using pushmode and flushmode
Code: Select all
} else {
pushmode $chan $text
flushmode $chan
putquick "NOTICE $nick :Done."
set chanmodes2 [lindex [getchanmode $chan] 0]
putquick "NOTICE $nick :The current modes set on $chan are now: $chanmodes2"
}
if that doesn't work add a utimer to get the chanmodes
Elen sila lúmenn' omentielvo
user
Posts: 1452 Joined: Tue Mar 18, 2003 9:58 pm
Location: Norway
Post
by user » Wed Aug 11, 2004 3:29 pm
putquick is using the mode queue, so pushmode/flushmode won't make a difference, but the mode change won't be seen by the bot untill later on, so you better use a timer or "fake" it by interpreting the requested change like the irc server would.
Have you ever read "The Manual"?