[IRCServices Coding] Which route to take - Module?

Yusuf Iskenderoglu uhc0 at rz.uni-karlsruhe.de
Thu Sep 4 01:34:06 PDT 2003


Hello;

Long question; long answer.
First of all, you must come off the thoughts of "Against the RFC".
Why? Because, tons of irc servers available do provide techniques, which
do not appear, or appear differently on the irc RFC, so that by design
these ircds are also against it. In most of the cases, these changes
reflect themselves in their appropriate server-to-server protocols, and
become transient to the clients, so that on client side, the protocol
remains original. This is also the only way of ensuring that all of the
clients can work with a specific irc daemon.

The issue, why PRIVMSG instead of NOTICE is bad, does also result from
the client-to-server part of the RFC. And it has a reason. Consider two
automated clients (bots, services, etc) talking to each other with
PRIVMSG, and saying things like:
<NickServ> otherwise, I change your nick.
<MyBot> Unknown command otherwise. Please repeat your query.
<NickServ> Unknown command UNKNOWN.
<MyBot> Unknown command unknown. Please repeat your query.
<NickServ> Unknown command UNKNOWN.
<MyBot> Unknown command unknown. Please repeat your query.
<NickServ> Unknown command UNKNOWN.
<MyBot> Unknown command unknown. Please repeat your query.
<NickServ> Unknown command UNKNOWN.
<MyBot> Unknown command unknown. Please repeat your query.
...

Do you understand, what problem may conclude due to PRIVMSG? RFC says
clearly, that clients shall not generate automatic replies to NOTICES.
That way, your bot would not "talk" to NickServ after a NOTICE anymore.

To your case.
The most easy implementation of this is creating a NF_USE_PRIVMSG flag,
with a value far greater than any of the built-in, so that in future
this flag does not collide with any of the original flags. 

Then you create the new SET command for this, as well as its help text,
primarily in the english language file. That part of the work is
trivial. 

Afterwards, you should modify notice_lang, and check for the
NF_USE_PRIVMSG flag of the "ngi" being used; and if true, send PRIVMSG
instead. The same for notice_help. And your case could be marked as
closed.

Do keep in mind that requesting support for modified services versions
are subject to be ignored.

I hope it helps,
yusuf

On Thu, 2003-09-04 at 05:49, Brent DiNicola wrote:
> It wasn't an easy subject to sum up in just a few words.
> 
> I am wanting to do something to the ircservices code, I want to change
> the way the notice() works. I know that modifying the send.c would be
> very frowned upon and then I got to thinking and had suggested that I
> maybe make a module to keep the information for me. I know it's against
> the RFC, but I am pressed against a brick wall here, I have to give the users
> an option to use PRIVMSG or NOTICE. Now, to help people move to NOTICE
> I would like to give them the option of turning on PRIVMSG but have NOTICE
> be the default, that would get the lazy people to use NOTICE. Eventually
> getting rid of this problem. In the mean time, I was thinking what is the best
> way to go about this without causing trouble for me and anyone else who has
> to deal with this code. Is it possible or even suggested to make a module that
> would replace the notice() from send.c with it's own, leaving the code in 
> send.c
> alone and not causing troubles down the road. Suggestions were that I make a
> module that kept the info for each nick's setting and then if I could override
> the notice() and notice_lang() and notice_help() in send.c that would keep 
> all the
> other code clean and not cause other troubles. I want to know what the best
> way to do this would be, I know it's against RFC but I want to move to newer
> services than the 1.4.3pre4 that we are using now and add modules so that I
> can do things down the line. They are used to having PRIVMSG and I can't just
> change it without running people off, so if I can make PRIVMSG an option
> then I can't be blamed if they are lazy. Opinions on how to go about this? I
> know this topic has been asked before and I know your not going to make it
> part of your code, I just wanted to know from the people who know the code
> really well what the best route to take would be to do the least amount of
> damage. (And if someone has done this.. please let me know what you did,
> examples would rock)
> 
> Thanks
> 
> Brent
> 
> 
> 
> ----------------------------------------------------------
> |               Brent DiNicola                                  |
> |           The Whitewolf of Immyrr                     |
> |                  <elric at elric.net>                             |
> |           http://www.melnibone.net                      |
> |   Disclaimer: Any opinions expressed here are  |
> |  from my dog. Any liabilities fall to the dog.     |
> ----------------------------------------------------------- 
> 
> ------------------------------------------------------------------
> To unsubscribe or change your subscription options, visit:
> http://www.ircservices.za.net/mailman/listinfo/ircservices-coding
-- 
------------------------------------------------------------------ 
| Yusuf Iskenderoglu                | You get to meet all sorts, | 
| eMail - uhc0 at stud.uni-karlsruhe.de| in this line of work...    | 
| eMail - s_iskend at ira.uka.de       |                            | 
| ICQ UIN : 20587464 \ TimeMr14C    |                            | 
------------------------------------------------------------------