Anope IRC Services

Please login or register.

Login with username, password and session length
Advanced search  

News:

Pages: [1]   Go Down

Author Topic: how do i add the channel #?  (Read 7173 times)

0 Members and 1 Guest are viewing this topic.

thomas

  • Anope User
  • Offline Offline
  • Posts: 2
how do i add the channel #?
« on: February 04, 2011, 09:46:07 AM »

hello i was wondering if you could help me allow the channel # on my anope
if you can how would i do this and what would i need to do it?
Logged

Jobe

  • Contributor
  • *
  • Offline Offline
  • Gender: Male
  • Posts: 1023
    • Anope IRC Services
Re: how do i add the channel #?
« Reply #1 on: February 04, 2011, 09:50:56 AM »

If you're using Anope 1.8.* you simply can't due to a hard coded restriction, the reason of which it exists I am currently unsure.
Logged
Your IP: ()
My IRC Status:

Come along and visit http://www.anopequotes.org/

thomas

  • Anope User
  • Offline Offline
  • Posts: 2
Re: how do i add the channel #?
« Reply #2 on: February 04, 2011, 09:54:19 AM »

ok
Logged

Jan Milants

  • Team
  • *
  • Offline Offline
  • Gender: Male
  • Posts: 1372
Re: how do i add the channel #?
« Reply #3 on: February 04, 2011, 10:05:21 AM »

At some point I think it was assumed that a channel must have a name, but since anope considers '#' to be part of the name, technically '#' should probably work in the latest releases.. the check is there for historical reasons though and won't be removed from the 1.8 branch..

That said, however, there is actually a way to register '#'.. cs_saregister provides an oper register command that bypasses a number of checks, including this one, allowing '#' to be registered. When I tested it I found nothing in the core that broke when using '#'...  :)

I m not sure what the RFC has to say about using the channel # though...
Logged
If you like me donate coins to 1FBmZVT4J8WAUMHKqpWhgNVj3XXnRN1cCk :)

Jobe

  • Contributor
  • *
  • Offline Offline
  • Gender: Male
  • Posts: 1023
    • Anope IRC Services
Re: how do i add the channel #?
« Reply #4 on: February 04, 2011, 10:10:59 AM »

RFC wise # is a eprfectly legal channel name. The only RFC requirements are that the name begin with a # (or & but forget that for now) and that the rest of the name mus NOT contain a space, coma, null, bell, new line or carriage return character.

Specifically defined as:
 <channel>    ::= ('#' | '&') <chstring>
 <chstring>   ::= <any 8bit code except SPACE, BELL, NUL, CR, LF and
                     comma (',')>

I'll admit it doesnt say <chstring> is optional, but nowhere that I recall in the RFC says its required.
Logged
Your IP: ()
My IRC Status:

Come along and visit http://www.anopequotes.org/

katsklaw

  • Supporter
  • Anope User
  • Offline Offline
  • Posts: 537
Re: how do i add the channel #?
« Reply #5 on: February 04, 2011, 04:39:13 PM »

<channel>    ::= ('#' | '&') <chstring> <--- that *IS* the required syntax.

<chstring>   ::= <any 8bit code except SPACE, BELL, NUL, CR, LF and comma (',')> <--- explicitly says any code except NULL.

All syntax in RFC1459 is required unless explicitly labeled optional. therefore # is an illegal channel name per RFC.
« Last Edit: February 04, 2011, 04:42:41 PM by katsklaw »
Logged

Jobe

  • Contributor
  • *
  • Offline Offline
  • Gender: Male
  • Posts: 1023
    • Anope IRC Services
Re: how do i add the channel #?
« Reply #6 on: February 04, 2011, 11:55:38 PM »

<channel>    ::= ('#' | '&') <chstring> <--- that *IS* the required syntax.

<chstring>   ::= <any 8bit code except SPACE, BELL, NUL, CR, LF and comma (',')> <--- explicitly says any code except NULL.

All syntax in RFC1459 is required unless explicitly labeled optional. therefore # is an illegal channel name per RFC.

Youre thinking of a null length string, the RFC is specifically referring to the NUL character (0x00), which would indicate the end of the channel name (and the string in most languages), and thus still leave the channel name legal.

To translate to a regex the RFC specification for a channel name would be (not + not * for content of channel name as the RFC does not say the content of the name is optional, and where only the channel name is captured):
Code: [Select]
^([#&][^\x00\x07\x0A\x0D\x20\x2C]+)
And to further quote RFC1459:
Quote
   Channels names are strings (beginning with a '&' or '#' character) of
   length up to 200 characters.  Apart from the the requirement that the
   first character being either '&' or '#'; the only restriction on a
   channel name is that it may not contain any spaces (' '), a control G
   (^G or ASCII 7), or a comma (',' which is used as a list item
   separator by the protocol).
« Last Edit: February 05, 2011, 12:17:31 AM by Jobe »
Logged
Your IP: ()
My IRC Status:

Come along and visit http://www.anopequotes.org/

katsklaw

  • Supporter
  • Anope User
  • Offline Offline
  • Posts: 537
Re: how do i add the channel #?
« Reply #7 on: February 05, 2011, 06:21:58 PM »

a NULL string still isn't 8bit, so it's still illegal. NULL is the absence of a string. Not equal to 0 but it doesn't exist in any form.

You are right, the RFC does not say it's optional, therefore it isn't. If the chstring was optional, it would say so just like it does in all of other places in the RFC.

"Channels names are strings (beginning with a '&' or '#' character) of length up to 200 characters."

In order for a string to BEGIN with a # or & it must have more than 1 character.
« Last Edit: February 05, 2011, 11:25:50 PM by katsklaw »
Logged
Pages: [1]   Go Up