| View previous topic :: View next topic |
| Author |
Message |
T-Xorcist Halfop
Joined: 14 Nov 2005 Posts: 47 Location: Netherlands
|
Posted: Fri Aug 24, 2007 9:12 am Post subject: Get modes of channel [SOLVED] |
|
|
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 _________________ is-1337.org IRC server!
Last edited by T-Xorcist on Sun Aug 26, 2007 9:27 am; edited 1 time in total |
|
| Back to top |
|
 |
r0t3n Owner
Joined: 31 May 2005 Posts: 507 Location: UK
|
Posted: Fri Aug 24, 2007 11:36 am Post subject: |
|
|
| Code: | | [getchanmode #channel] |
So if you want to check for the 'r' flag, you can use:
| Code: | 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 |
|
| Back to top |
|
 |
T-Xorcist Halfop
Joined: 14 Nov 2005 Posts: 47 Location: Netherlands
|
Posted: Sun Aug 26, 2007 8:41 am Post subject: |
|
|
I'm going to try! Thank you!
Edit: It works perfectly! Really much appreciated! _________________ is-1337.org IRC server! |
|
| Back to top |
|
 |
|