Page 1 of 1

ircservices, umode +r doesn't work...

Posted: Tue Oct 03, 2006 8:58 pm
by DJ-L
Hello,

I have configured unrealIRCd (3.2.5) and ircServices (5.0.59) at first time in my live. It works really good. But there is one thing which does not work: The usermode flag +r will not be set by NickServ. I know from an other commercial IRC/Service-Daemon that it will be set if a user identify its nick. I don't know where is the problem. But user who have identified itself will be detected as identified by NickServ. Only the visual flag in the client is not visible.

Thanks Dirk.

Another thing (offtopic):
I had a problem to compiling the source on a Solaris 10 machine. There was an error likes: 'symbol INADDR_NONE not found'. I don't know if it is because I had no root access, but I could solve this problem. I added the following lines to the timesynch.c :

Code: Select all

/* Solarisfix by Dirk Lehmann */
#ifndef INADDR_NONE
#define INADDR_NONE ((unsigned long) -1)
#endif

Posted: Tue Oct 03, 2006 10:42 pm
by Jobe
About the +r the sollution is to make sure the name of your services server appears inside a ulines block. For example:

Code: Select all

ulines {
   services.invictachat.net;
};
You will then need to rehash your IRCd.

Posted: Wed Oct 04, 2006 5:52 am
by Ron2K
Another thing to take note of is that ircservices uses SVSMODE, which hides the mode change from the user.

Posted: Wed Oct 04, 2006 12:21 pm
by DJ-L
Ron2K wrote:Another thing to take note of is that ircservices uses SVSMODE, which hides the mode change from the user.
OK, I have tested '/os raw SVS2MODE <nick> :+r' and it works fine. Is there a way to use the svs2mode-command instead of svsmode?

Dirk.

Posted: Wed Oct 04, 2006 6:42 pm
by DJ-L
DJ-L wrote:OK, I have tested '/os raw SVS2MODE <nick> :+r' and it works fine. Is there a way to use the svs2mode-command instead of svsmode?

Dirk.
Okay,

after long time of code browsing I could solve this (my) problem. I have edit the ircServices's send.c. Please note that it was a fast idea and it should not be implemented in a release version (IMHO) if this code read an official ircServices-coder.

original send.c:

Code: Select all

void vsend_cmd(const char *source, const char *fmt, va_list args)
{
    char buf[BUFSIZE];

    if (!servsock)
        return;
    vsnprintf(buf, sizeof(buf), fmt, args); 
    if (source) {
        if (servsock)
            sockprintf(servsock, ":%s %s\r\n", source, buf);
    .
    .
    .
was changed to:

Code: Select all

void vsend_cmd(const char *source, const char *fmt, va_list args)
{
    char buf[BUFSIZE];

    if (!servsock)
        return;

    /* SVS2MODE's only by Dirk Lehmann */
    if(strncmp(fmt, "SVSMODE", 7))
      vsnprintf(buf, sizeof(buf), fmt, args);
    else {
      strncpy(buf, "SVS2MODE", 8);
      vsnprintf(&buf[8], sizeof(buf)-8, &fmt[7], args);
    }

    if (source) {
        if (servsock)
            sockprintf(servsock, ":%s %s\r\n", source, buf);
    .
    .
    .
... and my NickServ can set visible umodes :D ...

Thanks for the answers,
Dirk.

PS: Changings of code in your local copy is in your own risk. If you don't understand it, let it be or trust my code :P

[Edit]: A little how to (on a machine with a running ircservices-daemon and allready existing source and configure-settings):
  1. Edit the send.c in the ircservices-5.x.xx path.
  2. Run: make
  3. Run: make install
  4. Kill the running ircservices daemon.
  5. Run: ./ircservices