ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/svn/ircd-hybrid/trunk/modules/core/m_message.c
Revision: 3975
Committed: Wed Jun 18 11:58:56 2014 UTC (12 years, 1 month ago) by michael
Content type: text/x-csrc
File size: 21512 byte(s)
Log Message:
- m_message.c:msg_client(): replaced MyConnect with MyClient test. Otherwise +R/+G opers won't receive
  server notices for remote CONNECT and remote KLINE/DLINE/XLINE/RESV attempts.

File Contents

# Content
1 /*
2 * ircd-hybrid: an advanced, lightweight Internet Relay Chat Daemon (ircd)
3 *
4 * Copyright (c) 1997-2014 ircd-hybrid development team
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
19 * USA
20 */
21
22 /*! \file m_message.c
23 * \brief Includes required functions for processing the PRIVMSG/NOTICE command.
24 * \version $Id$
25 */
26
27 #include "stdinc.h"
28 #include "list.h"
29 #include "client.h"
30 #include "ircd.h"
31 #include "numeric.h"
32 #include "conf.h"
33 #include "server.h"
34 #include "send.h"
35 #include "parse.h"
36 #include "modules.h"
37 #include "channel.h"
38 #include "channel_mode.h"
39 #include "irc_string.h"
40 #include "hash.h"
41 #include "packet.h"
42
43
44 enum
45 {
46 PRIVMSG = 0,
47 NOTICE = 1
48 };
49
50 enum
51 {
52 ENTITY_NONE = 0,
53 ENTITY_CHANNEL = 1,
54 ENTITY_CHANOPS_ON_CHANNEL = 2,
55 ENTITY_CLIENT = 3
56 };
57
58 static struct entity
59 {
60 void *ptr;
61 int type;
62 int flags;
63 } targets[IRCD_BUFSIZE];
64
65 static int unsigned ntargets = 0;
66
67
68 /*
69 ** m_privmsg
70 **
71 ** massive cleanup
72 ** rev argv 6/91
73 **
74 ** Another massive cleanup Nov, 2000
75 ** (I don't think there is a single line left from 6/91. Maybe.)
76 ** m_privmsg and m_notice do basically the same thing.
77 ** in the original 2.8.2 code base, they were the same function
78 ** "m_message.c." When we did the great cleanup in conjuncton with bleep
79 ** of ircu fame, we split m_privmsg.c and m_notice.c.
80 ** I don't see the point of that now. Its harder to maintain, its
81 ** easier to introduce bugs into one version and not the other etc.
82 ** Really, the penalty of an extra function call isn't that big a deal folks.
83 ** -db Nov 13, 2000
84 **
85 */
86
87 /* duplicate_ptr()
88 *
89 * inputs - pointer to check
90 * - pointer to table of entities
91 * - number of valid entities so far
92 * output - YES if duplicate pointer in table, NO if not.
93 * note, this does the canonize using pointers
94 * side effects - NONE
95 */
96 static int
97 duplicate_ptr(const void *ptr)
98 {
99 for (unsigned int i = 0; i < ntargets; ++i)
100 if (targets[i].ptr == ptr)
101 return 1;
102
103 return 0;
104 }
105
106 /* flood_attack_client()
107 *
108 * inputs - flag 0 if PRIVMSG 1 if NOTICE. RFC
109 * say NOTICE must not auto reply
110 * - pointer to source Client
111 * - pointer to target Client
112 * output - 1 if target is under flood attack
113 * side effects - check for flood attack on target target_p
114 */
115 static int
116 flood_attack_client(int p_or_n, struct Client *source_p,
117 struct Client *target_p)
118 {
119 int delta;
120
121 if (GlobalSetOptions.floodcount && MyConnect(target_p) &&
122 IsClient(source_p) && !IsCanFlood(source_p))
123 {
124 if ((target_p->localClient->first_received_message_time + 1)
125 < CurrentTime)
126 {
127 delta =
128 CurrentTime - target_p->localClient->first_received_message_time;
129 target_p->localClient->received_number_of_privmsgs -= delta;
130 target_p->localClient->first_received_message_time = CurrentTime;
131
132 if (target_p->localClient->received_number_of_privmsgs <= 0)
133 {
134 target_p->localClient->received_number_of_privmsgs = 0;
135 DelFlag(target_p, FLAGS_FLOOD_NOTICED);
136 }
137 }
138
139 if ((target_p->localClient->received_number_of_privmsgs >=
140 GlobalSetOptions.floodcount) || HasFlag(target_p, FLAGS_FLOOD_NOTICED))
141 {
142 if (!HasFlag(target_p, FLAGS_FLOOD_NOTICED))
143 {
144 sendto_realops_flags(UMODE_BOTS, L_ALL, SEND_NOTICE,
145 "Possible Flooder %s on %s target: %s",
146 get_client_name(source_p, HIDE_IP),
147 source_p->servptr->name, target_p->name);
148
149 AddFlag(target_p, FLAGS_FLOOD_NOTICED);
150 target_p->localClient->received_number_of_privmsgs += 2; /* Add a bit of penalty */
151 }
152
153 if (MyClient(source_p) && p_or_n != NOTICE)
154 sendto_one_notice(source_p, &me, ":*** Message to %s throttled due to flooding",
155 target_p->name);
156 return 1;
157 }
158 else
159 target_p->localClient->received_number_of_privmsgs++;
160 }
161
162 return 0;
163 }
164
165 /* flood_attack_channel()
166 *
167 * inputs - flag 0 if PRIVMSG 1 if NOTICE. RFC
168 * says NOTICE must not auto reply
169 * - pointer to source Client
170 * - pointer to target channel
171 * output - 1 if target is under flood attack
172 * side effects - check for flood attack on target chptr
173 */
174 static int
175 flood_attack_channel(int p_or_n, struct Client *source_p,
176 struct Channel *chptr)
177 {
178 int delta;
179
180 if (GlobalSetOptions.floodcount && !IsCanFlood(source_p))
181 {
182 if ((chptr->first_received_message_time + 1) < CurrentTime)
183 {
184 delta = CurrentTime - chptr->first_received_message_time;
185 chptr->received_number_of_privmsgs -= delta;
186 chptr->first_received_message_time = CurrentTime;
187
188 if (chptr->received_number_of_privmsgs <= 0)
189 {
190 chptr->received_number_of_privmsgs = 0;
191 ClearFloodNoticed(chptr);
192 }
193 }
194
195 if ((chptr->received_number_of_privmsgs >= GlobalSetOptions.floodcount) ||
196 IsSetFloodNoticed(chptr))
197 {
198 if (!IsSetFloodNoticed(chptr))
199 {
200 sendto_realops_flags(UMODE_BOTS, L_ALL, SEND_NOTICE,
201 "Possible Flooder %s on %s target: %s",
202 get_client_name(source_p, HIDE_IP),
203 source_p->servptr->name, chptr->chname);
204
205 SetFloodNoticed(chptr);
206 chptr->received_number_of_privmsgs += 2; /* Add a bit of penalty */
207 }
208
209 if (MyClient(source_p) && p_or_n != NOTICE)
210 sendto_one_notice(source_p, &me, ":*** Message to %s throttled due to flooding",
211 chptr->chname);
212 return 1;
213 }
214 else
215 chptr->received_number_of_privmsgs++;
216 }
217
218 return 0;
219 }
220
221 /* msg_channel()
222 *
223 * inputs - flag privmsg or notice
224 * - pointer to command "PRIVMSG" or "NOTICE"
225 * - pointer to source_p
226 * - pointer to channel
227 * output - NONE
228 * side effects - message given channel
229 */
230 static void
231 msg_channel(int p_or_n, const char *command,
232 struct Client *source_p, struct Channel *chptr, char *text)
233 {
234 int result = 0;
235
236 /* Chanops and voiced can flood their own channel with impunity */
237 if ((result = can_send(chptr, source_p, NULL, text)) < 0)
238 {
239 if (result == CAN_SEND_OPV ||
240 !flood_attack_channel(p_or_n, source_p, chptr))
241 sendto_channel_butone(source_p, source_p, chptr, 0, "%s %s :%s",
242 command, chptr->chname, text);
243 }
244 else
245 {
246 if (p_or_n != NOTICE)
247 {
248 if (result == ERR_NOCTRLSONCHAN)
249 sendto_one_numeric(source_p, &me, ERR_NOCTRLSONCHAN,
250 chptr->chname, text);
251 else if (result == ERR_NEEDREGGEDNICK)
252 sendto_one_numeric(source_p, &me, ERR_NEEDREGGEDNICK,
253 chptr->chname);
254 else
255 sendto_one_numeric(source_p, &me, ERR_CANNOTSENDTOCHAN,
256 chptr->chname);
257 }
258 }
259 }
260
261 /* msg_channel_flags()
262 *
263 * inputs - flag 0 if PRIVMSG 1 if NOTICE. RFC
264 * say NOTICE must not auto reply
265 * - pointer to command, "PRIVMSG" or "NOTICE"
266 * - pointer to source_p
267 * - pointer to channel
268 * - flags
269 * - pointer to text to send
270 * output - NONE
271 * side effects - message given channel either chanop or voice
272 */
273 static void
274 msg_channel_flags(int p_or_n, const char *command,
275 struct Client *source_p, struct Channel *chptr,
276 int flags, char *text)
277 {
278 unsigned int type;
279 char c;
280
281 if (flags & CHFL_VOICE)
282 {
283 type = CHFL_VOICE|CHFL_HALFOP|CHFL_CHANOP;
284 c = '+';
285 }
286 else if (flags & CHFL_HALFOP)
287 {
288 type = CHFL_HALFOP|CHFL_CHANOP;
289 c = '%';
290 }
291 else
292 {
293 type = CHFL_CHANOP;
294 c = '@';
295 }
296
297 sendto_channel_butone(source_p, source_p, chptr, type, "%s %c%s :%s",
298 command, c, chptr->chname, text);
299 }
300
301 /* msg_client()
302 *
303 * inputs - flag 0 if PRIVMSG 1 if NOTICE. RFC
304 * say NOTICE must not auto reply
305 * - pointer to command, "PRIVMSG" or "NOTICE"
306 * - pointer to source_p source (struct Client *)
307 * - pointer to target_p target (struct Client *)
308 * - pointer to text
309 * output - NONE
310 * side effects - message given channel either chanop or voice
311 */
312 static void
313 msg_client(int p_or_n, const char *command, struct Client *source_p,
314 struct Client *target_p, char *text)
315 {
316 if (MyClient(source_p))
317 {
318 if (p_or_n != NOTICE && target_p->away[0])
319 sendto_one_numeric(source_p, &me, RPL_AWAY, target_p->name, target_p->away);
320
321 if (HasUMode(target_p, UMODE_REGONLY) && target_p != source_p)
322 {
323 if (!HasUMode(source_p, UMODE_REGISTERED|UMODE_OPER))
324 {
325 if (p_or_n != NOTICE)
326 sendto_one_numeric(source_p, &me, ERR_NONONREG, target_p->name);
327 return;
328 }
329 }
330 }
331
332 if (MyClient(target_p))
333 {
334 if (!IsServer(source_p) && HasUMode(target_p, UMODE_CALLERID|UMODE_SOFTCALLERID))
335 {
336 /* Here is the anti-flood bot/spambot code -db */
337 if (accept_message(source_p, target_p) || HasFlag(source_p, FLAGS_SERVICE) ||
338 (HasUMode(source_p, UMODE_OPER) && ConfigFileEntry.opers_bypass_callerid))
339 {
340 sendto_one(target_p, ":%s!%s@%s %s %s :%s",
341 source_p->name, source_p->username,
342 source_p->host, command, target_p->name, text);
343 }
344 else
345 {
346 int callerid = !!HasUMode(target_p, UMODE_CALLERID);
347
348 /* check for accept, flag recipient incoming message */
349 if (p_or_n != NOTICE)
350 sendto_one_numeric(source_p, &me, RPL_TARGUMODEG,
351 target_p->name,
352 callerid ? "+g" : "+G",
353 callerid ? "server side ignore" :
354 "server side ignore with the exception of common channels");
355
356 if ((target_p->localClient->last_caller_id_time +
357 ConfigFileEntry.caller_id_wait) < CurrentTime)
358 {
359 if (p_or_n != NOTICE)
360 sendto_one_numeric(source_p, &me, RPL_TARGNOTIFY, target_p->name);
361
362 sendto_one_numeric(target_p, &me, RPL_UMODEGMSG,
363 get_client_name(source_p, HIDE_IP),
364 callerid ? "+g" : "+G");
365
366 target_p->localClient->last_caller_id_time = CurrentTime;
367
368 }
369
370 /* Only so opers can watch for floods */
371 flood_attack_client(p_or_n, source_p, target_p);
372 }
373 }
374 else
375 {
376 /*
377 * If the client is remote, we dont perform a special check for
378 * flooding.. as we wouldnt block their message anyway.. this means
379 * we dont give warnings.. we then check if theyre opered
380 * (to avoid flood warnings), lastly if theyre our client
381 * and flooding -- fl
382 */
383 if (!MyClient(source_p) || HasUMode(source_p, UMODE_OPER) ||
384 !flood_attack_client(p_or_n, source_p, target_p))
385 sendto_anywhere(target_p, source_p, command, ":%s", text);
386 }
387 }
388 else if (!MyClient(source_p) || HasUMode(source_p, UMODE_OPER) ||
389 !flood_attack_client(p_or_n, source_p, target_p))
390 sendto_anywhere(target_p, source_p, command, ":%s", text);
391 }
392
393 /* handle_special()
394 *
395 * inputs - client pointer
396 * - nick stuff to grok for opers
397 * - text to send if grok
398 * output - none
399 * side effects - old style username@server is handled here for non opers
400 * opers are allowed username%hostname@server
401 * all the traditional oper type messages are also parsed here.
402 * i.e. "/msg #some.host."
403 * However, syntax has been changed.
404 * previous syntax "/msg #some.host.mask"
405 * now becomes "/msg $#some.host.mask"
406 * previous syntax of: "/msg $some.server.mask" remains
407 * This disambiguates the syntax.
408 *
409 * XXX N.B. dalnet changed it to nick@server as have other servers.
410 * we will stick with tradition for now.
411 * - Dianora
412 */
413 static void
414 handle_special(int p_or_n, const char *command, struct Client *source_p,
415 const char *nick, const char *text)
416 {
417 struct Client *target_p = NULL;
418 const char *server = NULL, *s = NULL;
419
420 /*
421 * user[%host]@server addressed?
422 */
423 if ((server = strchr(nick, '@')))
424 {
425 if ((target_p = hash_find_server(server + 1)) == NULL)
426 {
427 sendto_one_numeric(source_p, &me, ERR_NOSUCHSERVER, server + 1);
428 return;
429 }
430
431 if (!HasUMode(source_p, UMODE_OPER) && strchr(nick, '%'))
432 {
433 sendto_one_numeric(source_p, &me, ERR_NOSUCHNICK, nick);
434 return;
435 }
436
437 if (!IsMe(target_p))
438 {
439 sendto_one(target_p, ":%s %s %s :%s", source_p->id, command, nick, text);
440 return;
441 }
442
443 sendto_one_numeric(source_p, &me, ERR_NOSUCHNICK, nick);
444 return;
445 }
446
447 if (!HasUMode(source_p, UMODE_OPER))
448 {
449 sendto_one_numeric(source_p, &me, ERR_NOPRIVILEGES);
450 return;
451 }
452
453 /*
454 * The following two cases allow masks in NOTICEs
455 * (for OPERs only)
456 *
457 * Armin, 8Jun90 (gruner@informatik.tu-muenchen.de)
458 */
459 if (*nick == '$')
460 {
461 if (*(nick + 1) == '$' || *(nick + 1) == '#')
462 ++nick;
463 else if (MyClient(source_p))
464 {
465 sendto_one_notice(source_p, &me, ":The command %s %s is no longer supported, please use $%s",
466 command, nick, nick);
467 return;
468 }
469
470 if ((s = strrchr(nick, '.')) == NULL)
471 {
472 sendto_one_numeric(source_p, &me, ERR_NOTOPLEVEL, nick);
473 return;
474 }
475
476 while (*++s)
477 if (*s == '.' || *s == '*' || *s == '?')
478 break;
479
480 if (*s == '*' || *s == '?')
481 {
482 sendto_one_numeric(source_p, &me, ERR_WILDTOPLEVEL, nick);
483 return;
484 }
485
486 sendto_match_butone(IsServer(source_p->from) ? source_p->from : NULL, source_p,
487 nick + 1, (*nick == '#') ? MATCH_HOST : MATCH_SERVER,
488 "%s $%s :%s", command, nick, text);
489 }
490 }
491
492 /* build_target_list()
493 *
494 * inputs - pointer to given source (oper/client etc.)
495 * - pointer to list of nicks/channels
496 * - pointer to table to place results
497 * - pointer to text (only used if source_p is an oper)
498 * output - number of valid entities
499 * side effects - target_table is modified to contain a list of
500 * pointers to channels or clients
501 * if source client is an oper
502 * all the classic old bizzare oper privmsg tricks
503 * are parsed and sent as is, if prefixed with $
504 * to disambiguate.
505 *
506 */
507 static int
508 build_target_list(int p_or_n, const char *command, struct Client *source_p,
509 char *nicks_channels, char *text)
510 {
511 int type = 0;
512 char *p = NULL, *nick = NULL;
513 char *target_list = NULL;
514 struct Channel *chptr = NULL;
515 struct Client *target_p = NULL;
516
517 target_list = nicks_channels;
518
519 ntargets = 0;
520
521 for (nick = strtoken(&p, target_list, ","); nick;
522 nick = strtoken(&p, NULL, ","))
523 {
524 char *with_prefix = NULL;
525
526 /*
527 * Channels are privmsg'd a lot more than other clients, moved up
528 * here plain old channel msg?
529 */
530 if (IsChanPrefix(*nick))
531 {
532 if ((chptr = hash_find_channel(nick)))
533 {
534 if (!duplicate_ptr(chptr))
535 {
536 if (ntargets >= ConfigFileEntry.max_targets)
537 {
538 sendto_one_numeric(source_p, &me, ERR_TOOMANYTARGETS,
539 nick, ConfigFileEntry.max_targets);
540 return 1;
541 }
542
543 targets[ntargets].ptr = chptr;
544 targets[ntargets++].type = ENTITY_CHANNEL;
545 }
546 }
547 else
548 {
549 if (p_or_n != NOTICE)
550 sendto_one_numeric(source_p, &me, ERR_NOSUCHNICK, nick);
551 }
552
553 continue;
554 }
555
556 /* Look for a PRIVMSG/NOTICE to another client */
557 if ((target_p = find_person(source_p, nick)))
558 {
559 if (!duplicate_ptr(target_p))
560 {
561 if (ntargets >= ConfigFileEntry.max_targets)
562 {
563 sendto_one_numeric(source_p, &me, ERR_TOOMANYTARGETS,
564 nick, ConfigFileEntry.max_targets);
565 return 1;
566 }
567
568 targets[ntargets].ptr = target_p;
569 targets[ntargets].type = ENTITY_CLIENT;
570 targets[ntargets++].flags = 0;
571 }
572
573 continue;
574 }
575
576 /* @#channel or +#channel message ? */
577 type = 0;
578 with_prefix = nick;
579
580 /* Allow %+@ if someone wants to do that */
581 while (1)
582 {
583 if (*nick == '@')
584 type |= CHFL_CHANOP;
585 else if (*nick == '%')
586 type |= CHFL_CHANOP | CHFL_HALFOP;
587 else if (*nick == '+')
588 type |= CHFL_CHANOP | CHFL_HALFOP | CHFL_VOICE;
589 else
590 break;
591 ++nick;
592 }
593
594 if (type)
595 {
596 if (*nick == '\0') /* If its a '\0' dump it, there is no recipient */
597 {
598 sendto_one_numeric(source_p, &me, ERR_NORECIPIENT, command);
599 continue;
600 }
601
602 /*
603 * At this point, nick+1 should be a channel name i.e. #foo or &foo
604 * if the channel is found, fine, if not report an error
605 */
606 if ((chptr = hash_find_channel(nick)))
607 {
608 if (IsClient(source_p) && !HasFlag(source_p, FLAGS_SERVICE))
609 {
610 if (!has_member_flags(find_channel_link(source_p, chptr),
611 CHFL_CHANOP|CHFL_HALFOP|CHFL_VOICE))
612 {
613 sendto_one_numeric(source_p, &me, ERR_CHANOPRIVSNEEDED, with_prefix);
614 return -1;
615 }
616 }
617
618 if (!duplicate_ptr(chptr))
619 {
620 if (ntargets >= ConfigFileEntry.max_targets)
621 {
622 sendto_one_numeric(source_p, &me, ERR_TOOMANYTARGETS,
623 nick, ConfigFileEntry.max_targets);
624 return 1;
625 }
626
627 targets[ntargets].ptr = chptr;
628 targets[ntargets].type = ENTITY_CHANOPS_ON_CHANNEL;
629 targets[ntargets++].flags = type;
630 }
631 }
632 else
633 {
634 if (p_or_n != NOTICE)
635 sendto_one_numeric(source_p, &me, ERR_NOSUCHNICK, nick);
636 }
637
638 continue;
639 }
640
641 if (*nick == '$' || strchr(nick, '@'))
642 handle_special(p_or_n, command, source_p, nick, text);
643 else
644 {
645 if (p_or_n != NOTICE)
646 {
647 if (!IsDigit(*nick) || MyClient(source_p))
648 sendto_one_numeric(source_p, &me, ERR_NOSUCHNICK, nick);
649 }
650 }
651 }
652
653 return 1;
654 }
655
656 /*
657 * inputs - flag privmsg or notice
658 * - pointer to command "PRIVMSG" or "NOTICE"
659 * - pointer to source_p
660 * - pointer to channel
661 */
662 static void
663 m_message(int p_or_n, const char *command, struct Client *source_p,
664 int parc, char *parv[])
665 {
666 if (parc < 2 || EmptyString(parv[1]))
667 {
668 if (p_or_n != NOTICE)
669 sendto_one_numeric(source_p, &me, ERR_NORECIPIENT, command);
670 return;
671 }
672
673 if (parc < 3 || EmptyString(parv[2]))
674 {
675 if (p_or_n != NOTICE)
676 sendto_one_numeric(source_p, &me, ERR_NOTEXTTOSEND);
677 return;
678 }
679
680 /* Finish the flood grace period... */
681 if (MyClient(source_p) && !IsFloodDone(source_p))
682 flood_endgrace(source_p);
683
684 if (build_target_list(p_or_n, command, source_p, parv[1], parv[2]) < 0)
685 return;
686
687 for (unsigned int i = 0; i < ntargets; ++i)
688 {
689 switch (targets[i].type)
690 {
691 case ENTITY_CLIENT:
692 msg_client(p_or_n, command, source_p, targets[i].ptr, parv[2]);
693 break;
694
695 case ENTITY_CHANNEL:
696 msg_channel(p_or_n, command, source_p, targets[i].ptr, parv[2]);
697 break;
698
699 case ENTITY_CHANOPS_ON_CHANNEL:
700 msg_channel_flags(p_or_n, command, source_p,
701 targets[i].ptr, targets[i].flags, parv[2]);
702 break;
703 }
704 }
705 }
706
707 static int
708 m_privmsg(struct Client *source_p, int parc, char *parv[])
709 {
710 /*
711 * Servers have no reason to send privmsgs, yet sometimes there is cause
712 * for a notice.. (for example remote kline replies) --fl_
713 */
714 if (!IsClient(source_p))
715 return 0;
716
717 if (MyConnect(source_p))
718 source_p->localClient->last_privmsg = CurrentTime;
719
720 m_message(PRIVMSG, "PRIVMSG", source_p, parc, parv);
721 return 0;
722 }
723
724 static int
725 m_notice(struct Client *source_p, int parc, char *parv[])
726 {
727 m_message(NOTICE, "NOTICE", source_p, parc, parv);
728 return 0;
729 }
730
731 static struct Message privmsg_msgtab =
732 {
733 "PRIVMSG", 0, 0, 0, MAXPARA, MFLG_SLOW, 0,
734 { m_unregistered, m_privmsg, m_privmsg, m_ignore, m_privmsg, m_ignore }
735 };
736
737 static struct Message notice_msgtab =
738 {
739 "NOTICE", 0, 0, 0, MAXPARA, MFLG_SLOW, 0,
740 { m_unregistered, m_notice, m_notice, m_ignore, m_notice, m_ignore }
741 };
742
743 static void
744 module_init(void)
745 {
746 mod_add_cmd(&privmsg_msgtab);
747 mod_add_cmd(&notice_msgtab);
748 }
749
750 static void
751 module_exit(void)
752 {
753 mod_del_cmd(&privmsg_msgtab);
754 mod_del_cmd(&notice_msgtab);
755 }
756
757 struct module module_entry =
758 {
759 .node = { NULL, NULL, NULL },
760 .name = NULL,
761 .version = "$Revision$",
762 .handle = NULL,
763 .modinit = module_init,
764 .modexit = module_exit,
765 .flags = MODULE_FLAG_CORE
766 };

Properties

Name Value
svn:eol-style native
svn:keywords Id Revision