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.
Requests for complete scripts or modifications/fixes for scripts you didn't write. Response not guaranteed, and no thread bumping!
T-Xorcist
Halfop
Posts: 47 Joined: Mon Nov 14, 2005 6:36 pm
Location: Netherlands
Contact:
Post
by T-Xorcist » Fri Aug 24, 2007 9:12 am
Hi there!
I have a bit of a problem, with the modes on a channel.
I have an IRCbot running on a UnrealIRCD network.
How do I get the modes of the channel? Like, mtnr.
The purpose? I want to check if the channel is registered, else, leave the channel again.
Can anyone explain to me how this is possible?
Thanks in advance.
With kind regards,
T-Xorcist
Last edited by
T-Xorcist on Sun Aug 26, 2007 9:27 am, edited 1 time in total.
r0t3n
Owner
Posts: 507 Joined: Tue May 31, 2005 6:56 pm
Location: UK
Post
by r0t3n » Fri Aug 24, 2007 11:36 am
So if you want to check for the 'r' flag, you can use:
Code: Select all
if {[string match *r* [lindex [getchanmode $var] 0]]} { # r is set } else { # r is not set }
if {[regexp {r} [lindex [getchanmode $var] 0]]} { #r is set } else { #r is not set }
Hope this helps!
r0t3n @ #r0t3n @ Quakenet
T-Xorcist
Halfop
Posts: 47 Joined: Mon Nov 14, 2005 6:36 pm
Location: Netherlands
Contact:
Post
by T-Xorcist » Sun Aug 26, 2007 8:41 am
I'm going to try! Thank you!
Edit: It works perfectly! Really much appreciated!