Anope IRC Services

Anope Development => Modules => Topic started by: BlackDragon on January 10, 2007, 01:39:20 PM

Title: register the "#" channel
Post by: BlackDragon on January 10, 2007, 01:39:20 PM
Greetings From Greece,

I like your BIG work on the services thing and applaud you. Many thanks to all your team members who "kill theirselves in work"!!! I was wandering if anyone could tell me HOW am i gonna register this channel ( " # " ) ? It says, it can't be registered and i want desperately to be able to register it :'(
Can anyone help me, please? :(

Many thanks in advance...!
Title:
Post by: Jan Milants on January 10, 2007, 02:11:12 PM
almost impossible since this is a restriction checked for almost everywhere in the core, no module can help that...
Title:
Post by: BlackDragon on January 10, 2007, 02:30:15 PM
but why? :'(
can't we do something about that? not in one in a million ? :'( :'( :'( :'( :'( :'( :'( :'( :'(

[Edited on 10/1/2007 by BlackDragon]
Title:
Post by: Trystan Scott Lee on January 10, 2007, 04:49:22 PM
Viper you are incorrect, a the # is trapped down in cs_register now, a custom mod of that could be made to allow # to be registered.

It is disallowed due to # is a html special character and thus interfers with web interfaces.
Title:
Post by: BlackDragon on January 10, 2007, 04:52:40 PM
so, with the proper module, it could become able to register the " # " channel....

right...... is there any module created yet for that reason or can anyone make it?

thanks again....

[Edited on 10/1/2007 by BlackDragon]
Title:
Post by: Jan Milants on January 10, 2007, 05:37:04 PM
hmmm so anope_valid_chan() doesn't filter # ?

in that case yeh it s possible... and relatively easy to accomplish..

[Edited on 10-1-2007 by Viper]
Title:
Post by: Pieter Bootsma on January 10, 2007, 06:09:17 PM
It's not registerable because various core functions of Anope and a number of IRCd's and clients had issues with the channel # if i recall correctly. It has nothing to do with it being a HTML special character or anything.
Title:
Post by: Trystan Scott Lee on January 10, 2007, 06:57:22 PM
oddily enough I had a conversation with dengle about this and how # would mess things up with phpanope, moments later Certus or Dengle commited the change

     } else if (!stricmp(chan, "#")) {
        notice_lang(s_ChanServ, u, CHAN_MAY_NOT_BE_REGISTERED, chan);

there is the one line i cs_register that cares about it being only #

anope_valid_chan() was added to fix a bug generated by unreal that some channels can not be registered, thus it checks to make sure that its not one of those
Title:
Post by: BlackDragon on January 10, 2007, 11:43:26 PM
so, Trystan, you say that it is possible to register it by altering the core or something, GeniusDex (Anope Developer ) says that it is impossible to do it, to alter the core....
ok, now who am i supposed to believe? :P

[Edited on 11/1/2007 by BlackDragon]

[Edited on 11/1/2007 by BlackDragon]
Title:
Post by: Trystan Scott Lee on January 11, 2007, 01:30:29 AM
as a former Anope developer I can tell you that if you copy cs_register.c from core and rename it, to say.. cs_register_special.c and find the line where the thing checks for the channel name being only # it will work.

There are NO other checks in the core code for # being there, so just don't load anope's default cs_register and load your cs_register_special and there you go you can now register channels that are only #
Title:
Post by: BlackDragon on January 11, 2007, 02:40:16 AM
ok found the cs_register.c in the core folder, i found the line....
what should i do with it ? just comment out the line ?
Title:
Post by: BlackDragon on January 11, 2007, 02:41:19 AM
this one

Code: [Select]

    } else if (!stricmp(chan, "#")) {
        notice_lang(s_ChanServ, u, CHAN_MAY_NOT_BE_REGISTERED, chan);
Title:
Post by: n00bie on January 11, 2007, 02:48:30 AM
comment the line stating:
else if (!stricmp(chan, "#")) {
        notice_lang(s_ChanServ, u, CHAN_MAY_NOT_BE_REGISTERED, chan);
    }

next, you will need to unload the core "cs_register" module, after that load your module "cs_register_special" or whatever you named it. *bingo*
Title:
Post by: BlackDragon on January 11, 2007, 02:49:48 AM
well... i'll go try it and if it success, i'll let you know ;)
Title:
Post by: n00bie on January 11, 2007, 02:51:34 AM
well, i've just tested that on 1.7.18, works fine. Thats why i posted your reply.
Title:
Post by: BlackDragon on January 11, 2007, 02:55:32 AM
it worked indeed :D thank you very much :D
but as soon as i started the services i got this error msg :/
Code: [Select]

[BlackDragon@enigma services]$ ./services
services.conf:145: Warning: unterminated double-quoted string
services.conf:146: Warning: too many parameters (8 max)
[BlackDragon@enigma services]$
Title:
Post by: BlackDragon on January 11, 2007, 02:56:32 AM
daaaahhh nevermind it's probably my fault... i'll check it
Title:
Post by: BlackDragon on January 11, 2007, 02:58:03 AM
hooraaaaaaaay
everything works fine
THANKS A LOT GUYS! YOU'RE THE BEST ;)
Title:
Post by: BlackDragon on January 11, 2007, 03:00:17 AM
huh? wait a minute.... i registered the " # " channel and after a restart of the services the channel got expired.... why ? :'(
Title:
Post by: BlackDragon on January 11, 2007, 03:03:04 AM
oopsie :/ forgive me for the spam ( post flood ).....
it is ok after all ( i think so .... ) , i re-registered the channel then sevices restart and the channel is still registered... don't know why was expired the first time .... weird..

[Edited on 11/1/2007 by BlackDragon]
Title:
Post by: n00bie on January 11, 2007, 03:03:07 AM
hmm... i drop the channel, re-registered it again, restart services; but it works fine for me :?