egghelp.org community Forum Index
[ egghelp.org home | forum home ]
egghelp.org community
Discussion of eggdrop bots, shell accounts and tcl scripts.
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Get modes of channel [SOLVED]

 
Post new topic   Reply to topic    egghelp.org community Forum Index -> Script Requests
View previous topic :: View next topic  
Author Message
T-Xorcist
Halfop


Joined: 14 Nov 2005
Posts: 47
Location: Netherlands

PostPosted: Fri Aug 24, 2007 9:12 am    Post subject: Get modes of channel [SOLVED] Reply with quote

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
View user's profile Send private message Visit poster's website
r0t3n
Owner


Joined: 31 May 2005
Posts: 507
Location: UK

PostPosted: Fri Aug 24, 2007 11:36 am    Post subject: Reply with quote

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
View user's profile Send private message MSN Messenger
T-Xorcist
Halfop


Joined: 14 Nov 2005
Posts: 47
Location: Netherlands

PostPosted: Sun Aug 26, 2007 8:41 am    Post subject: Reply with quote

I'm going to try! Thank you!

Edit: It works perfectly! Really much appreciated!
_________________
is-1337.org IRC server!
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    egghelp.org community Forum Index -> Script Requests All times are GMT - 4 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Forum hosting provided by Reverse.net

Powered by phpBB © 2001, 2005 phpBB Group
subGreen style by ktauber