|
|
Joined: Oct 2006
Posts: 342
Fjord artisan
|
OP
Fjord artisan
Joined: Oct 2006
Posts: 342 |
how to know if channel is registered or not
--
is there a way to do this using raws or if not how to...
learn learn learn
|
|
|
|
Joined: Aug 2004
Posts: 7,252
Hoopy frood
|
Hoopy frood
Joined: Aug 2004
Posts: 7,252 |
Check the channel modes. The mode you're looking for is r (note: this is different from R).
This is a standard setting for most (if not all) IRCd's
If you're wanting to get the information without being in the channel, I believe this is possible, however the website that has the information that I'm requiring to confirm this is currently experiencing trouble, so I'm unable to look up the information.
|
|
|
|
Joined: Jan 2007
Posts: 259
Fjord artisan
|
Fjord artisan
Joined: Jan 2007
Posts: 259 |
You can try using /cs info #channel, if you're on a network using Unreal IRCd, or GameSurge.
Those who can, cannot. Those who cannot, can.
|
|
|
|
Joined: Oct 2006
Posts: 342
Fjord artisan
|
OP
Fjord artisan
Joined: Oct 2006
Posts: 342 |
yes but how about using a code to do this can it be done?
learn learn learn
|
|
|
|
Joined: Oct 2006
Posts: 342
Fjord artisan
|
OP
Fjord artisan
Joined: Oct 2006
Posts: 342 |
learn learn learn
|
|
|
|
Joined: Dec 2006
Posts: 3
Self-satisified door
|
Self-satisified door
Joined: Dec 2006
Posts: 3 |
if (r isin $chan($chan).mode) { echo $chan registered } else { echo $chan unregistered }
|
|
|
|
Joined: Aug 2004
Posts: 7,252
Hoopy frood
|
Hoopy frood
Joined: Aug 2004
Posts: 7,252 |
echo $chan $iif(r isincs $chan($chan).mode,Registered,Un-registered)
|
|
|
|
Joined: Jan 2007
Posts: 259
Fjord artisan
|
Fjord artisan
Joined: Jan 2007
Posts: 259 |
That will only work if he is on the channel.
Those who can, cannot. Those who cannot, can.
|
|
|
|
Joined: Jan 2007
Posts: 259
Fjord artisan
|
Fjord artisan
Joined: Jan 2007
Posts: 259 |
You would use a "on *:notice:*:?: {" event. The nick would usualy be ChanServ, and for gamesurge it will eather say: "#... Information:" followed by several lines, or it will say: "You must provide the name of a channel that exists." or "# has not been registered with ChanServ.". However, you would need to cut your script in half to do this effectively.
Those who can, cannot. Those who cannot, can.
|
|
|
|
Joined: Aug 2004
Posts: 7,252
Hoopy frood
|
Hoopy frood
Joined: Aug 2004
Posts: 7,252 |
Yes, I know that. I should've put in a little note stating that the code I provided was simply an updated version of the code posted by KonstantineX.
|
|
|
|
Joined: Mar 2005
Posts: 420
Fjord artisan
|
Fjord artisan
Joined: Mar 2005
Posts: 420 |
The code would depend on what network you will use it. On Undernet, "r" would mean that only users who are logged on to X can join the channel.
If you have a plastic floor runner over your tiles, then you're one Hella Pinoy!
|
|
|
|
Joined: Oct 2006
Posts: 342
Fjord artisan
|
OP
Fjord artisan
Joined: Oct 2006
Posts: 342 |
I'm on DALnet server doesn't works...
learn learn learn
|
|
|
|
Joined: Oct 2006
Posts: 342
Fjord artisan
|
OP
Fjord artisan
Joined: Oct 2006
Posts: 342 |
learn learn learn
|
|
|
|
Joined: Jun 2003
Posts: 994
Hoopy frood
|
Hoopy frood
Joined: Jun 2003
Posts: 994 |
For DALnet, /cs info #channelname You either get information (if it's registered), or you get: The channel #channelname is not registered. scripted:
on 1:notice:*End of Info*:*: echo -a Channel is registered.
on 1:notice:*not registered*:*: echo -a Channel is NOT registered.
I refuse to engage in a battle of wits with an unarmed person.
|
|
|
|
Joined: Oct 2006
Posts: 342
Fjord artisan
|
OP
Fjord artisan
Joined: Oct 2006
Posts: 342 |
like I said w/out using server commands...
learn learn learn
|
|
|
|
Joined: Jun 2003
Posts: 994
Hoopy frood
|
Hoopy frood
Joined: Jun 2003
Posts: 994 |
even raws come from the server
I refuse to engage in a battle of wits with an unarmed person.
|
|
|
|
Joined: Oct 2006
Posts: 342
Fjord artisan
|
OP
Fjord artisan
Joined: Oct 2006
Posts: 342 |
how bout w/out using chanserv
learn learn learn
|
|
|
|
Joined: Jan 2007
Posts: 259
Fjord artisan
|
Fjord artisan
Joined: Jan 2007
Posts: 259 |
You can use:
if (r isincs $chan(#CHANNEL).mode) {
do stuff
}
But this won't work with all networks, and can return false results on some networks.
Those who can, cannot. Those who cannot, can.
|
|
|
|
Joined: Oct 2006
Posts: 342
Fjord artisan
|
OP
Fjord artisan
Joined: Oct 2006
Posts: 342 |
that's like this from RusselB echo $chan $iif(r isincs $chan($chan).mode,Registered,Un-registered) But gives me error results Server:DALnet
learn learn learn
|
|
|
|
Joined: Jun 2003
Posts: 5,024
Hoopy frood
|
Hoopy frood
Joined: Jun 2003
Posts: 5,024 |
Because DALnet uses Chanserv which runs as a background service, +r is not applied to channels on DALnet which are registered. It did used to be, but isn't anymore. $chan will not pick up on +r on that network.
People have given you valid solutions for an alternative though, i.e. the on notice events responding to chanserv's messages when infoing a channel. Channel services are not integrally server related though which is why it's not as simple as you wish it to be.
Regards,
Mentality/Chris
|
|
|
|
|
|