Last edited/inserted FAQ entries (all)
66. I made changes to my oer configuration but the changes aren't getting saved! Why not?
26. How much load (channels, users, nicks, etc) can oer handle?
34. oer or oer+MySQL seems to disconnect from the IRC server (sign off) more often than other bots or IRC clients, why?
<<  |  <  |  >  |  >>
Q: How to setup NickServ using the provided Q auth mechanism? (#67)
Inserted/last edited by EQU <equ@equnet.org> on 2003-06-11 17:49:07
A: First thing to note is that what you are asking requires a code change. I am working on a general mechanism that will allow any commands to be issued on connect or timer but it could take some time before I have the time to write it. Second thing to note is that when I am talking about NickServ I am talking about DALnet's NickServ.

Now for the code change. Look in ds.c, line 1585 (oer 1.0-64) and change the snprintf call in the following section
/* query Q if not queried before */
if(mystate->qauth.hasauth && !mystate->qauth.isonline && (mystate->now - mystate->qauth.lastquery) > OER_Q_QUERY_INTERVAL) {
	snprintf(timed_str, WRITE_BUFFER_LENGTH, "USERHOST %s", Q_NICK);
	timed_new(NULL, mystate->now, OER_TIMED_TYPE_NORMAL, OER_TIMED_PRIORITY_CHANNEL_PROTECTION, timed_str);
	mystate->qauth.lastquery = mystate->now;
}
to
	snprintf(timed_str, WRITE_BUFFER_LENGTH, "USERHOST %s", mystate->nick);
In other words oer will issue a USERHOST for himself. Then in ds.c line 1591 (oer 1.0-64) change the snprintf call in the following section
/* send unsent qauth */
if(mystate->qauth.hasauth && !mystate->qauth.authed && mystate->qauth.isonline) {
	snprintf(timed_str, WRITE_BUFFER_LENGTH, "PRIVMSG %s :AUTH %s %s", mystate->qauth.q, mystate->qauth.name, mystate->qauth.password);
	timed_new(NULL, mystate->now, OER_TIMED_TYPE_NORMAL, OER_TIMED_PRIORITY_CHANNEL_HANDLING, timed_str);
	mystate->qauth.authed = 1;
}
to
	snprintf(timed_str, WRITE_BUFFER_LENGTH, "PRIVMSG %s :IDENTIFY %s %s", mystate->qauth.q, mystate->qauth.name, mystate->qauth.password);
In other words AUTH is changed to IDENTIFY. As the last code change in parse.c line 188 (oer 1.0-64) change the strcasecmp call in the following section
strncpy(userhost, outstring + tpos + 1, USERHOSTLEN);
if(mystate->qauth.hasauth && !strcasecmp(temp_nick, Q_NICK)) {
	/* Q query initiated in processenv() */
	mystate->qauth.isonline = 1;
}
to
if(mystate->qauth.hasauth && !strcasecmp(temp_nick, mystate->nick)) {
Then you would simply add a Q auth with
/msg oer edit qauth NickServ <nick> <password>
That should be it. If your NickServ is different from the one DALnet uses, you should be able to figure out it yourself.