home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #30 / NN_1992_30.iso / spool / alt / irc / 4739 < prev    next >
Encoding:
Text File  |  1992-12-20  |  2.1 KB  |  68 lines

  1. Newsgroups: alt.irc
  2. Path: sparky!uunet!pipex!doc.ic.ac.uk!warwick!sunserver1.aston.ac.uk!uhura!evansmp
  3. From: evansmp@uhura.aston.ac.uk (Mark Evans)
  4. Subject: Re: patriot.mit.edu (vanity server alert)
  5. Message-ID: <1992Dec18.082654.17711@aston.ac.uk>
  6. Sender: usenet@aston.ac.uk (Usenet administrator)
  7. Nntp-Posting-Host: uhura
  8. Organization: Aston University
  9. X-Newsreader: TIN [version 1.1 PL241235]
  10. References: <9212172023.AA08764@hrt213.brooks.af.mil>
  11. Date: Fri, 18 Dec 1992 08:26:54 GMT
  12. Lines: 54
  13.  
  14. Tim Miller (tjm@hrt213.brooks.af.mil) wrote:
  15. : On Thu, 17 Dec 1992 16:16:50 GMT, mnystrom@athena.mit.edu (Mika Nystroem) said:
  16. :  M> I haven't fixed it because I don't have root access and the people who do aren't
  17. :  M> going to. I did the following instead:
  18. :  M> [from /scratch2/mnystrom/ircd.conf]
  19. :  M> K:patriot::*
  20. :  M> K:localhost::*
  21. :  M> So now we get:
  22. :  M> *** Connecting to port 6667 of server patriot
  23. :  M> *** *** Ghosts are not allowed on IRC.
  24. :  M> I hope everyone is satisfied. 
  25. :     Hardly.  Take it out.
  26. :     Why should you disallow user on the host local to the server
  27. : simply because some loser decides that it offends his sensibilities?
  28. : Particularly when he's dunce enough to call a *system* problem an *IRC*
  29. : hack.
  30.  
  31. But one which can be gotten round by hacking the server slightly :-)
  32.  
  33. assume my_name contains the FQDN if the host the server is running on.
  34.  
  35. add as a global variable
  36.  
  37.     char *my_domain;
  38.  
  39. just after ircd.conf is read (cos that's probably where you have got the 
  40. FQDN of the server from)
  41.  
  42.     my_domain=index(my_name,'.');
  43.  
  44. if the routine to get the host name of the remote connection (read 'rhost'
  45. as whatever variable the code actually uses)
  46.  
  47. (if there is something like rhost=hp->host do rhost=strcpy(temp,rhost);
  48. where temp is a string of size 65, or more)
  49.  
  50.     if (strcmp(rhost,"localhost")) strcpy(rhost,my_name);
  51.     if (!index(rhost,'.')) strcat(rhost,my_domain);
  52.  
  53. and thats it!
  54.  
  55.  
  56. --
  57. -------------------------------------------------------------------------
  58. Mark Evans                                   |evansmp@uhura.aston.ac.uk
  59. +(44) 21 429 9199  (Home)                    |evansmp@cs.aston.ac.uk
  60. +(44) 21 359 6531 x4039 (Office)             |
  61.