05-28-2017, 16:51 +0200
AuthorPost
thommey  08-09-2004, 14:28   | [EGG] Get the limit/key value of a channel Jabber
(Administrator)
Member since 03/2004
62 Posts
                                                                                                                              
1
2
3
4
5
6
7
8
proc getchanlimit {chan} {
    set chanmode [lindex [split [getchanmode $chan]] 0]
    if {[string first l $chanmode] == -1} { return 0 }
    if {[string first k $chanmode] == -1 || [string first k $chanmode] > [string first l $chanmode]} {
        return [lindex [split $chanmode] 1]
    }
    return [lindex [split $chanmode] 2]
}


You have to modify it yourself to get they key (easy :)
This post was edited 3 times, last on 02-05-2014, 01:05 by thommey
CyBex  03-20-2006, 20:11   | [EGG] ismode Jabber  ICQ  AOL IM  Yahoo IM  MSN  Homepage
nie da
(Administrator)

Avatar

Member since 01/2004
260 Posts
Location: Berlin
                                                                                                                              
1
2
3
proc ismode {chan mode} {
    if {[validchan $chan] && [string match "*$mode*" [lindex [split [getchanmode $chan]] 0]]} {return 1} {return 0}
}


Use:
if {[ismode #tcl c]} {putmsg #tcl "without color"} {putmsg #tcl "redgreenblue"}

mfG CyBex @ QuakeNet, UnderNet, EFNet, Freenode, euIRC, GameSurge & ShadowWorld - Files
Advanced options for this topic:

Ignore this topic (Do not list this topic in the "unread topics" search. You are currently not ignoring this topic.)
Hide this topic (Hidden topics are not displayed in the topics list. This topic is currently not hidden.)
Go to forum

Unclassified NewsBoard 1.5.3-d | © 2003-4 by Yves Goergen