mIRC Homepage
Posted By: learn3r how to know if channel is registered or not - 08/03/07 04:09 AM
how to know if channel is registered or not

--

is there a way to do this using raws or if not how to...
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.
You can try using /cs info #channel, if you're on a network using Unreal IRCd, or GameSurge.
yes but how about using a code to do this can it be done?
hehe don`t understand
if (r isin $chan($chan).mode) { echo $chan registered }
else { echo $chan unregistered }
Code:
echo $chan $iif(r isincs $chan($chan).mode,Registered,Un-registered)

That will only work if he is on the channel.
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.
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.
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.
I'm on DALnet server doesn't works...
it can`t be done..
For DALnet, /cs info #channelname

You either get information (if it's registered), or you get:

The channel #channelname is not registered.

scripted:
Code:
on 1:notice:*End of Info*:*: echo -a Channel is registered.
on 1:notice:*not registered*:*: echo -a Channel is NOT registered.
like I said w/out using server commands...
even raws come from the server smile
how bout w/out using chanserv
You can use:
Code:
if (r isincs $chan(#CHANNEL).mode) {
do stuff
}

But this won't work with all networks, and can return false results on some networks.
that's like this from RusselB
Code:
echo $chan $iif(r isincs $chan($chan).mode,Registered,Un-registered)


But gives me error results
Server:DALnet
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,
© mIRC Discussion Forums