ircii.patch 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. Index: include/whois.h
  2. --- include/whois.h.orig 2004-01-06 09:14:08 +0100
  3. +++ include/whois.h 2009-02-19 23:40:50 +0100
  4. @@ -42,6 +42,7 @@
  5. void whois_name(u_char *, u_char **);
  6. void whowas_name(u_char *, u_char **);
  7. void whois_channels(u_char *, u_char **);
  8. + void whois_loggedinas(u_char *, u_char **);
  9. void whois_server(u_char *, u_char **);
  10. void whois_oper(u_char *, u_char **);
  11. void whois_lastcom(u_char *, u_char **);
  12. Index: source/numbers.c
  13. --- source/numbers.c.orig 2004-01-08 00:30:00 +0100
  14. +++ source/numbers.c 2009-02-19 23:40:50 +0100
  15. @@ -506,6 +506,10 @@
  16. funny_mode(from, ArgList);
  17. break;
  18. + case 330: /* #define RPL_WHOISLOGGEDIN 330 */
  19. + whois_loggedinas(from, ArgList);
  20. + break;
  21. +
  22. case 341: /* #define RPL_INVITING 341 */
  23. invite(from, ArgList);
  24. break;
  25. Index: source/whois.c
  26. --- source/whois.c.orig 2006-07-22 05:50:10 +0200
  27. +++ source/whois.c 2009-02-19 23:40:50 +0100
  28. @@ -541,6 +541,28 @@
  29. }
  30. /*
  31. + * whois_server: Called in numbers.c when a numeric of 330 is received.
  32. + * Ratbox IRC sends ":%s 330 %s %s %s :is logged in as" with args
  33. + * me.name, data->client->name, data->target->name, data->target->user->suser
  34. + */
  35. +void
  36. +whois_loggedinas(from, ArgList)
  37. + u_char *from;
  38. + u_char **ArgList;
  39. +{
  40. + if (!ignore_whois_crap) {
  41. + u_char *nick, *user;
  42. + PasteArgs(ArgList, 2);
  43. + if ((nick = ArgList[0]) && (user = ArgList[1]) &&
  44. + do_hook(current_numeric, "%s %s %s %s", from,
  45. + nick, user, ArgList[2])) {
  46. + put_it("%s %s is logged in as %s", numeric_banner(),
  47. + nick, user);
  48. + }
  49. + }
  50. +}
  51. +
  52. +/*
  53. * whois_oper: This displays the operator status of a user, as returned by
  54. * numeric 313 from the server. If the ignore_whois_crap flag is set,
  55. * nothing is dispayed.