chanmode +y

These are old archives. They are kept for historic purposes only.
Post Reply
skywalker
Posts: 16
Joined: Mon Jan 02, 2012 1:57 pm

chanmode +y

Post by skywalker »

i want to use m_blocknonalpha but i can't set chanmode +y.
when i try i get:
y is unknown mode char to me

How can i set a mode char?
Stealth
Head of Support
Posts: 2086
Joined: Tue Jun 15, 2004 8:50 pm
Location: Chino Hills, CA, US
Contact:

Re: chanmode +y

Post by Stealth »

Works just fine on my test server.

Did you make sure the module was loaded and listed in /module ?

Code: Select all

-server.example.com- *** m_blocknonalpha (prevents nicks with non-alphabetic chars from joining a +y channel) [3RD]
* Stealthie sets mode: +y
-server.example.com- *** Your nick contains banned characters. Please register to nickserv or use a nick with alphabetic letters for being able to join channel #chan.
skywalker
Posts: 16
Joined: Mon Jan 02, 2012 1:57 pm

Re: chanmode +y

Post by skywalker »

i get: [20:03:17] [server.example.com] [455] [test] :Your username [test] contained the invalid character(s) [] and has been changed to test. Please use only the characters 0-9 a-z A-Z _ - or . in your username. Your username is the part before the @ in your email address.
but thats from the ident.
Both ident and nick are te same, the ident got changed to test, but the nick did not get changed and just joined the channel
also i can't set chanmode +y myself
Stealth
Head of Support
Posts: 2086
Joined: Tue Jun 15, 2004 8:50 pm
Location: Chino Hills, CA, US
Contact:

Re: chanmode +y

Post by Stealth »

Did you check /module to verify m_blocknonalpha is there?
skywalker
Posts: 16
Joined: Mon Jan 02, 2012 1:57 pm

Re: chanmode +y

Post by skywalker »

i think i got the wrong version then, can you point me to the working one?
its running but it does not work
skywalker
Posts: 16
Joined: Mon Jan 02, 2012 1:57 pm

Re: chanmode +y

Post by skywalker »

i did get m_blocknonalpha.c:123:2: warning: no newline at end of file when i used make cusummodule
maybe thats the problem?
Stealth
Head of Support
Posts: 2086
Joined: Tue Jun 15, 2004 8:50 pm
Location: Chino Hills, CA, US
Contact:

Re: chanmode +y

Post by Stealth »

In order for a module to work, it must be compiled successfully. Once it's compiled you will have m_blocknonalpha.so in your modules folder. You also must add it to your unrealircd.conf file, in the form of "loadmodule src/modules/m_blocknonalpha.so;". If you did not do any of these, you did not compile and load the module properly.

I could have told you that hours ago if you had followed my original instructions:
Did you make sure the module was loaded and listed in /module ?
Instructions can be found for loading modules here: http://unreal.x-tab.org/preview.php?p=faq#installmod

PLEASE make sure you read the Unreal documentation. If you cannot load a simple module you're sure to have bigger problems in the future.
skywalker
Posts: 16
Joined: Mon Jan 02, 2012 1:57 pm

Re: chanmode +y

Post by skywalker »

the module was compiled, i do know how to do that.
the.so whas created, the module shows up in the module list.
i just think i got a older version or something like that then.
all the other modules i've added does work.

now i found something in my .c file that maybe is the reason why it does not work:

/* As the unrealircd dev team changed isalpha(), we have to create our own function */
int charcheck(int c) {
if ((c == '|') || (c == '\\') || (c == '^') || (c == '-') || (c == '_') || (c == '{') || (c == '}') || (c == '[') || (c == ']'))
return 0;
else
return 1;
}

shouldn't that be like:

/* As the unrealircd dev team changed isalpha(), we have to create our own function */
int charcheck(int c) {
if ((c == '|') || (c == '\\') || (c == '^') || (c == '-') || (c == '_') || (c == '{') || (c == '}') || (c == '[') || (c == ']')) {
return 0;
}
else {
return 1;
}
}
Post Reply