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 

check if nick is in channel

 
Post new topic   Reply to topic    egghelp.org community Forum Index -> Scripting Help
View previous topic :: View next topic  
Author Message
skull
Guest





PostPosted: Mon Feb 07, 2022 8:45 am    Post subject: check if nick is in channel Reply with quote

Hello,
before executing a command I would need to check if the selected nickname is in channel.

How can I do that?
Thanks

P.S. I searched the whole forum but couldn't find anything useful (weird).
Back to top
SpiKe^^
Owner


Joined: 12 May 2006
Posts: 792
Location: Tennessee, USA

PostPosted: Mon Feb 07, 2022 10:36 am    Post subject: Reply with quote

onchan <nickname> [channel]

https://docs.eggheads.org/mainDocs/tcl-commands.html#onchan-nickname-channel
_________________
SpiKe^^

Get BogusTrivia 2.06.4.7 at www.mytclscripts.com
or visit the New Tcl Acrhive at www.tclarchive.org
.
Back to top
View user's profile Send private message Visit poster's website
simo
Owner


Joined: 22 Mar 2015
Posts: 941

PostPosted: Mon Feb 07, 2022 9:58 pm    Post subject: Reply with quote

if {![onchan $targetnick $chan]} {
Nick is not on channel so Do something here
} else { nick is on channel so Do something else here }
Back to top
View user's profile Send private message
skull
Guest





PostPosted: Tue Feb 08, 2022 2:46 pm    Post subject: Reply with quote

Thanks both and sorry but I wasn't notified by the forum.
Back to top
Display posts from previous:   
Post new topic   Reply to topic    egghelp.org community Forum Index -> Scripting Help 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