ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/svn/ircd-hybrid/branches/8.2.x/modules/core/m_sjoin.c
Revision: 7925
Committed: Sat Dec 31 13:57:24 2016 UTC (7 years, 3 months ago) by michael
Content type: text/x-csrc
File size: 19848 byte(s)
Log Message:
- Update copyright years

File Contents

# Content
1 /*
2 * ircd-hybrid: an advanced, lightweight Internet Relay Chat Daemon (ircd)
3 *
4 * Copyright (c) 1997-2017 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
19 * USA
20 */
21
22 /*! \file m_sjoin.c
23 * \brief Includes required functions for processing the SJOIN command.
24 * \version $Id$
25 */
26
27 #include "stdinc.h"
28 #include "list.h"
29 #include "channel.h"
30 #include "channel_mode.h"
31 #include "client.h"
32 #include "hash.h"
33 #include "irc_string.h"
34 #include "ircd.h"
35 #include "numeric.h"
36 #include "send.h"
37 #include "parse.h"
38 #include "modules.h"
39 #include "server.h"
40 #include "conf.h"
41 #include "misc.h"
42
43
44 static char modebuf[MODEBUFLEN];
45 static char parabuf[MODEBUFLEN];
46 static char sendbuf[MODEBUFLEN];
47 static const char *para[MAXMODEPARAMS];
48 static char *mbuf;
49 static int pargs;
50
51 static void set_final_mode(struct Mode *, struct Mode *);
52 static void remove_our_modes(struct Channel *, struct Client *);
53 static void remove_a_mode(struct Channel *, struct Client *, int, char);
54 static void remove_ban_list(struct Channel *, struct Client *, dlink_list *, char);
55
56
57 /* ms_sjoin()
58 *
59 * parv[0] - command
60 * parv[1] - TS
61 * parv[2] - channel
62 * parv[3] - modes + n arguments (key and/or limit)
63 * parv[4+n] - flags+nick list (all in one parameter)
64 *
65 * process a SJOIN, taking the TS's into account to either ignore the
66 * incoming modes or undo the existing ones or merge them, and JOIN
67 * all the specified users while sending JOIN/MODEs to local clients
68 */
69 static int
70 ms_sjoin(struct Client *source_p, int parc, char *parv[])
71 {
72 struct Channel *chptr = NULL;
73 struct Client *target_p = NULL;
74 uintmax_t newts;
75 uintmax_t oldts;
76 uintmax_t tstosend;
77 struct Mode mode, *oldmode;
78 int args = 0;
79 char keep_our_modes = 1;
80 char keep_new_modes = 1;
81 char have_many_uids = 0;
82 int lcount;
83 char uid_prefix[CMEMBER_STATUS_FLAGS_LEN + 1];
84 char *up = NULL;
85 int len_uid = 0;
86 int isnew = 0;
87 int buflen = 0;
88 int slen;
89 unsigned int fl;
90 char *s;
91 char *sptr;
92 char uid_buf[IRCD_BUFSIZE]; /* buffer for modes/prefixes */
93 char *uid_ptr;
94 char *p; /* pointer used making sjbuf */
95 const char *servername = (ConfigServerHide.hide_servers || IsHidden(source_p)) ?
96 me.name : source_p->name;
97
98 if (!IsServer(source_p))
99 return 0;
100
101 if (!channel_check_name(parv[2], 0))
102 {
103 sendto_realops_flags(UMODE_DEBUG, L_ALL, SEND_NOTICE,
104 "*** Too long or invalid channel name from %s(via %s): %s",
105 source_p->name, source_p->from->name, parv[2]);
106 return 0;
107 }
108
109 modebuf[0] = '\0';
110 mbuf = modebuf;
111 pargs = 0;
112 newts = strtoumax(parv[1], NULL, 10);
113
114 mode.mode = 0;
115 mode.limit = 0;
116 mode.key[0] = '\0';
117
118 for (const char *modes = parv[3]; *modes; ++modes)
119 {
120 switch (*modes)
121 {
122 case 'k':
123 strlcpy(mode.key, parv[4 + args], sizeof(mode.key));
124 ++args;
125
126 if (parc < 5 + args)
127 return 0;
128 break;
129
130 case 'l':
131 mode.limit = atoi(parv[4 + args]);
132 ++args;
133
134 if (parc < 5 + args)
135 return 0;
136 break;
137
138 default:
139 mode.mode |= ModeTable[(unsigned char)*modes].d;
140 break;
141 }
142 }
143
144 if ((chptr = hash_find_channel(parv[2])) == NULL)
145 {
146 isnew = 1;
147 chptr = channel_make(parv[2]);
148 }
149
150 parabuf[0] = '\0';
151 oldts = chptr->creationtime;
152 oldmode = &chptr->mode;
153
154 if (ConfigGeneral.ignore_bogus_ts)
155 {
156 if (newts < 800000000)
157 {
158 sendto_realops_flags(UMODE_DEBUG, L_ALL, SEND_NOTICE,
159 "*** Bogus TS %ju on %s ignored from %s(via %s)",
160 newts, chptr->name,
161 source_p->name, source_p->from->name);
162
163 newts = (oldts == 0) ? 0 : 800000000;
164 }
165 }
166 else
167 {
168 if (!newts && !isnew && oldts)
169 {
170 sendto_channel_local(NULL, chptr, 0, 0, 0,
171 ":%s NOTICE %s :*** Notice -- TS for %s changed from %ju to 0",
172 me.name, chptr->name, chptr->name, oldts);
173 sendto_realops_flags(UMODE_SERVNOTICE, L_ALL, SEND_NOTICE,
174 "Server %s changing TS on %s from %ju to 0",
175 source_p->name, chptr->name, oldts);
176 }
177 }
178
179 if (isnew)
180 chptr->creationtime = tstosend = newts;
181 else if (newts == 0 || oldts == 0)
182 chptr->creationtime = tstosend = 0;
183 else if (newts == oldts)
184 tstosend = oldts;
185 else if (newts < oldts)
186 {
187 keep_our_modes = 0;
188 chptr->creationtime = tstosend = newts;
189 }
190 else
191 {
192 keep_new_modes = 0;
193 tstosend = oldts;
194 }
195
196 if (!keep_new_modes)
197 mode = *oldmode;
198 else if (keep_our_modes)
199 {
200 mode.mode |= oldmode->mode;
201
202 if (oldmode->limit > mode.limit)
203 mode.limit = oldmode->limit;
204 if (strcmp(mode.key, oldmode->key) < 0)
205 strlcpy(mode.key, oldmode->key, sizeof(mode.key));
206 }
207
208 set_final_mode(&mode, oldmode);
209 chptr->mode = mode;
210
211 /* Lost the TS, other side wins, so remove modes on this side */
212 if (!keep_our_modes)
213 {
214 /* Update channel name to be the correct case */
215 if (!isnew)
216 strlcpy(chptr->name, parv[2], sizeof(chptr->name));
217
218 remove_our_modes(chptr, source_p);
219
220 if (dlink_list_length(&chptr->banlist))
221 remove_ban_list(chptr, source_p, &chptr->banlist, 'b');
222
223 if (dlink_list_length(&chptr->exceptlist))
224 remove_ban_list(chptr, source_p, &chptr->exceptlist, 'e');
225
226 if (dlink_list_length(&chptr->invexlist))
227 remove_ban_list(chptr, source_p, &chptr->invexlist, 'I');
228
229 clear_ban_cache_list(&chptr->locmembers);
230 clear_invite_list(&chptr->invites);
231
232 if (chptr->topic[0])
233 {
234 channel_set_topic(chptr, "", "", 0, 0);
235 sendto_channel_local(NULL, chptr, 0, 0, 0, ":%s TOPIC %s :",
236 (IsHidden(source_p) ||
237 ConfigServerHide.hide_servers) ?
238 me.name : source_p->name, chptr->name);
239 }
240
241 sendto_channel_local(NULL, chptr, 0, 0, 0,
242 ":%s NOTICE %s :*** Notice -- TS for %s changed from %ju to %ju",
243 me.name, chptr->name, chptr->name,
244 oldts, newts);
245 }
246
247 if (*modebuf != '\0')
248 {
249 /* This _SHOULD_ be to ALL_MEMBERS
250 * It contains only +imnpstlk, etc */
251 sendto_channel_local(NULL, chptr, 0, 0, 0, ":%s MODE %s %s %s",
252 servername, chptr->name, modebuf, parabuf);
253 }
254
255 if (*parv[3] != '0' && keep_new_modes)
256 channel_modes(chptr, source_p, modebuf, parabuf);
257 else
258 {
259 modebuf[0] = '0';
260 modebuf[1] = '\0';
261 }
262
263 buflen = snprintf(uid_buf, sizeof(uid_buf), ":%s SJOIN %ju %s %s %s:",
264 source_p->id, tstosend,
265 chptr->name, modebuf, parabuf);
266 uid_ptr = uid_buf + buflen;
267
268 /*
269 * Check we can fit a nick on the end, as well as \r\n and a prefix "
270 * @%+", and a space.
271 */
272 if (buflen >= (IRCD_BUFSIZE - IDLEN - 2 - CMEMBER_STATUS_FLAGS_LEN - 1))
273 {
274 sendto_realops_flags(UMODE_SERVNOTICE, L_ALL, SEND_NOTICE,
275 "Long SJOIN from server: %s(via %s) (ignored)",
276 source_p->name, source_p->from->name);
277 return 0;
278 }
279
280 mbuf = modebuf;
281 sendbuf[0] = '\0';
282 pargs = 0;
283
284 *mbuf++ = '+';
285
286 s = parv[args + 4];
287 while (*s == ' ')
288 ++s;
289
290 if ((p = strchr(s, ' ')))
291 {
292 *p++ = '\0';
293
294 while (*p == ' ')
295 ++p;
296 have_many_uids = *p;
297 }
298
299 while (*s)
300 {
301 int valid_mode = 1;
302 fl = 0;
303
304 do
305 {
306 switch (*s)
307 {
308 case '@':
309 fl |= CHFL_CHANOP;
310 ++s;
311 break;
312 case '%':
313 fl |= CHFL_HALFOP;
314 ++s;
315 break;
316 case '+':
317 fl |= CHFL_VOICE;
318 ++s;
319 break;
320 default:
321 valid_mode = 0;
322 break;
323 }
324 } while (valid_mode);
325
326 /*
327 * If the client doesn't exist, or if it's fake direction/server, skip.
328 * we cannot send ERR_NOSUCHNICK here because if it's a UID, we cannot
329 * lookup the nick, and it's better to never send the numeric than only
330 * sometimes.
331 */
332 if ((target_p = find_person(source_p, s)) == NULL || target_p->from != source_p->from)
333 goto nextnick;
334
335 len_uid = strlen(target_p->id);
336 up = uid_prefix;
337
338 if (keep_new_modes)
339 {
340 if (fl & CHFL_CHANOP)
341 {
342 *up++ = '@';
343 len_uid++;
344 }
345
346 if (fl & CHFL_HALFOP)
347 {
348 *up++ = '%';
349 len_uid++;
350 }
351
352 if (fl & CHFL_VOICE)
353 {
354 *up++ = '+';
355 len_uid++;
356 }
357 }
358 else
359 fl = 0;
360
361 *up = '\0';
362
363 if ((uid_ptr - uid_buf + len_uid) > (IRCD_BUFSIZE - 2))
364 {
365 sendto_server(source_p, 0, 0, "%s", uid_buf);
366
367 buflen = snprintf(uid_buf, sizeof(uid_buf), ":%s SJOIN %ju %s %s %s:",
368 source_p->id, tstosend,
369 chptr->name, modebuf, parabuf);
370 uid_ptr = uid_buf + buflen;
371 }
372
373 uid_ptr += sprintf(uid_ptr, "%s%s ", uid_prefix, target_p->id);
374
375 if (!IsMember(target_p, chptr))
376 {
377 add_user_to_channel(chptr, target_p, fl, !have_many_uids);
378
379 sendto_channel_local(NULL, chptr, 0, CAP_EXTENDED_JOIN, 0, ":%s!%s@%s JOIN %s %s :%s",
380 target_p->name, target_p->username,
381 target_p->host, chptr->name, target_p->account, target_p->info);
382 sendto_channel_local(NULL, chptr, 0, 0, CAP_EXTENDED_JOIN, ":%s!%s@%s JOIN :%s",
383 target_p->name, target_p->username,
384 target_p->host, chptr->name);
385
386 if (target_p->away[0])
387 sendto_channel_local(target_p, chptr, 0, CAP_AWAY_NOTIFY, 0,
388 ":%s!%s@%s AWAY :%s",
389 target_p->name, target_p->username,
390 target_p->host, target_p->away);
391 }
392
393 if (fl & CHFL_CHANOP)
394 {
395 *mbuf++ = 'o';
396 para[pargs++] = target_p->name;
397
398 if (pargs >= MAXMODEPARAMS)
399 {
400 /*
401 * Ok, the code is now going to "walk" through
402 * sendbuf, filling in para strings. So, I will use sptr
403 * to point into the sendbuf.
404 * Notice, that ircsprintf() returns the number of chars
405 * successfully inserted into string.
406 * - Dianora
407 */
408
409 sptr = sendbuf;
410 *mbuf = '\0';
411
412 for (lcount = 0; lcount < MAXMODEPARAMS; ++lcount)
413 {
414 slen = sprintf(sptr, " %s", para[lcount]); /* see? */
415 sptr += slen; /* ready for next */
416 }
417
418 sendto_channel_local(NULL, chptr, 0, 0, 0, ":%s MODE %s %s%s",
419 servername, chptr->name, modebuf, sendbuf);
420 mbuf = modebuf;
421 *mbuf++ = '+';
422
423 sendbuf[0] = '\0';
424 pargs = 0;
425 }
426 }
427
428 if (fl & CHFL_HALFOP)
429 {
430 *mbuf++ = 'h';
431 para[pargs++] = target_p->name;
432
433 if (pargs >= MAXMODEPARAMS)
434 {
435 sptr = sendbuf;
436 *mbuf = '\0';
437
438 for (lcount = 0; lcount < MAXMODEPARAMS; ++lcount)
439 {
440 slen = sprintf(sptr, " %s", para[lcount]);
441 sptr += slen;
442 }
443
444 sendto_channel_local(NULL, chptr, 0, 0, 0, ":%s MODE %s %s%s",
445 servername, chptr->name, modebuf, sendbuf);
446
447 mbuf = modebuf;
448 *mbuf++ = '+';
449
450 sendbuf[0] = '\0';
451 pargs = 0;
452 }
453 }
454
455 if (fl & CHFL_VOICE)
456 {
457 *mbuf++ = 'v';
458 para[pargs++] = target_p->name;
459
460 if (pargs >= MAXMODEPARAMS)
461 {
462 sptr = sendbuf;
463 *mbuf = '\0';
464
465 for (lcount = 0; lcount < MAXMODEPARAMS; ++lcount)
466 {
467 slen = sprintf(sptr, " %s", para[lcount]);
468 sptr += slen;
469 }
470
471 sendto_channel_local(NULL, chptr, 0, 0, 0, ":%s MODE %s %s%s",
472 servername, chptr->name, modebuf, sendbuf);
473
474 mbuf = modebuf;
475 *mbuf++ = '+';
476
477 sendbuf[0] = '\0';
478 pargs = 0;
479 }
480 }
481
482 nextnick:
483 if ((s = p) == NULL)
484 break;
485
486 while (*s == ' ')
487 ++s;
488
489 if ((p = strchr(s, ' ')))
490 {
491 *p++ = '\0';
492
493 while (*p == ' ')
494 ++p;
495 }
496 }
497
498 *mbuf = '\0';
499 *(uid_ptr - 1) = '\0';
500
501 /*
502 * checking for lcount < MAXMODEPARAMS at this time is wrong
503 * since the code has already verified above that pargs < MAXMODEPARAMS
504 * checking for para[lcount] != '\0' is also wrong, since
505 * there is no place where para[lcount] is set!
506 * - Dianora
507 */
508
509 if (pargs)
510 {
511 sptr = sendbuf;
512
513 for (lcount = 0; lcount < pargs; ++lcount)
514 {
515 slen = sprintf(sptr, " %s", para[lcount]);
516 sptr += slen;
517 }
518
519 sendto_channel_local(NULL, chptr, 0, 0, 0, ":%s MODE %s %s%s",
520 servername, chptr->name, modebuf, sendbuf);
521 }
522
523 /*
524 * If this happens, it's the result of a malformed SJOIN
525 * a remnant from the old persistent channel code. *sigh*
526 * Or it could be the result of a client just leaving
527 * and leaving us with a channel formed just as the client parts.
528 * - Dianora
529 */
530 if (!dlink_list_length(&chptr->members) && isnew)
531 {
532 channel_free(chptr);
533 return 0;
534 }
535
536 if (*parv[4 + args] == '\0')
537 return 0;
538
539 sendto_server(source_p, 0, 0, "%s", uid_buf);
540 return 0;
541 }
542
543 /* set_final_mode
544 *
545 * inputs - channel mode
546 * - old channel mode
547 * output - NONE
548 * side effects - walk through all the channel modes turning off modes
549 * that were on in oldmode but aren't on in mode.
550 * Then walk through turning on modes that are on in mode
551 * but were not set in oldmode.
552 */
553 static void
554 set_final_mode(struct Mode *mode, struct Mode *oldmode)
555 {
556 char *pbuf = parabuf;
557 int len = 0;
558
559 *mbuf++ = '-';
560
561 for (const struct mode_letter *tab = chan_modes; tab->letter; ++tab)
562 if ((tab->mode & oldmode->mode) && !(tab->mode & mode->mode))
563 *mbuf++ = tab->letter;
564
565 if (oldmode->limit && mode->limit == 0)
566 *mbuf++ = 'l';
567
568 if (oldmode->key[0] && mode->key[0] == '\0')
569 {
570 *mbuf++ = 'k';
571 len = sprintf(pbuf, "%s ", oldmode->key);
572 pbuf += len;
573 pargs++;
574 }
575
576 if (*(mbuf - 1) == '-')
577 *(mbuf - 1) = '+';
578 else
579 *mbuf++ = '+';
580
581 for (const struct mode_letter *tab = chan_modes; tab->letter; ++tab)
582 if ((tab->mode & mode->mode) && !(tab->mode & oldmode->mode))
583 *mbuf++ = tab->letter;
584
585 if (mode->limit && oldmode->limit != mode->limit)
586 {
587 *mbuf++ = 'l';
588 len = sprintf(pbuf, "%u ", mode->limit);
589 pbuf += len;
590 pargs++;
591 }
592
593 if (mode->key[0] && strcmp(oldmode->key, mode->key))
594 {
595 *mbuf++ = 'k';
596 len = sprintf(pbuf, "%s ", mode->key);
597 pbuf += len;
598 pargs++;
599 }
600
601 if (*(mbuf - 1) == '+')
602 *(mbuf - 1) = '\0';
603 else
604 *mbuf = '\0';
605 }
606
607 /* remove_our_modes()
608 *
609 * inputs - pointer to channel to remove modes from
610 * - client pointer
611 * output - NONE
612 * side effects - Go through the local members, remove all their
613 * chanop modes etc., this side lost the TS.
614 */
615 static void
616 remove_our_modes(struct Channel *chptr, struct Client *source_p)
617 {
618 remove_a_mode(chptr, source_p, CHFL_CHANOP, 'o');
619 remove_a_mode(chptr, source_p, CHFL_HALFOP, 'h');
620 remove_a_mode(chptr, source_p, CHFL_VOICE, 'v');
621 }
622
623 /* remove_a_mode()
624 *
625 * inputs - pointer to channel
626 * - server or client removing the mode
627 * - mask o/h/v mask to be removed
628 * - flag o/h/v to be removed
629 * output - NONE
630 * side effects - remove ONE mode from all members of a channel
631 */
632 static void
633 remove_a_mode(struct Channel *chptr, struct Client *source_p,
634 int mask, char flag)
635 {
636 dlink_node *node = NULL;
637 char lmodebuf[MODEBUFLEN];
638 char *sp = sendbuf;
639 const char *lpara[MAXMODEPARAMS];
640 unsigned int count = 0;
641 int l = 0;
642
643 mbuf = lmodebuf;
644 *mbuf++ = '-';
645 *sp = '\0';
646
647 DLINK_FOREACH(node, chptr->members.head)
648 {
649 struct Membership *member = node->data;
650
651 if ((member->flags & mask) == 0)
652 continue;
653
654 member->flags &= ~mask;
655
656 lpara[count++] = member->client_p->name;
657
658 *mbuf++ = flag;
659
660 if (count >= MAXMODEPARAMS)
661 {
662 for (unsigned int i = 0; i < MAXMODEPARAMS; ++i)
663 {
664 l = sprintf(sp, " %s", lpara[i]);
665 sp += l;
666 }
667
668 *mbuf = '\0';
669 sendto_channel_local(NULL, chptr, 0, 0, 0, ":%s MODE %s %s%s",
670 (IsHidden(source_p) || ConfigServerHide.hide_servers) ?
671 me.name : source_p->name,
672 chptr->name, lmodebuf, sendbuf);
673 mbuf = lmodebuf;
674 *mbuf++ = '-';
675 count = 0;
676 sp = sendbuf;
677 *sp = '\0';
678 }
679 }
680
681 if (count)
682 {
683 *mbuf = '\0';
684
685 for (unsigned int i = 0; i < count; ++i)
686 {
687 l = sprintf(sp, " %s", lpara[i]);
688 sp += l;
689 }
690
691 sendto_channel_local(NULL, chptr, 0, 0, 0, ":%s MODE %s %s%s",
692 (IsHidden(source_p) || ConfigServerHide.hide_servers) ?
693 me.name : source_p->name,
694 chptr->name, lmodebuf, sendbuf);
695 }
696 }
697
698 /* remove_ban_list()
699 *
700 * inputs - channel, source, list to remove, char of mode
701 * outputs - none
702 * side effects - given ban list is removed, modes are sent to local clients
703 */
704 static void
705 remove_ban_list(struct Channel *chptr, struct Client *source_p,
706 dlink_list *list, char c)
707 {
708 char lmodebuf[MODEBUFLEN];
709 char lparabuf[IRCD_BUFSIZE];
710 dlink_node *node = NULL, *node_next = NULL;
711 char *pbuf = NULL;
712 int count = 0;
713 int cur_len, mlen, plen;
714
715 pbuf = lparabuf;
716 cur_len = mlen = snprintf(lmodebuf, sizeof(lmodebuf), ":%s MODE %s -",
717 source_p->name, chptr->name);
718 mbuf = lmodebuf + mlen;
719
720 DLINK_FOREACH_SAFE(node, node_next, list->head)
721 {
722 struct Ban *ban = node->data;
723
724 plen = ban->len + 4; /* another +b and "!@ " */
725
726 if (count >= MAXMODEPARAMS ||
727 (cur_len + 1 /* space between */ + (plen - 1)) > IRCD_BUFSIZE - 2)
728 {
729 /* NUL-terminate and remove trailing space */
730 *mbuf = *(pbuf - 1) = '\0';
731 sendto_channel_local(NULL, chptr, 0, 0, 0, "%s %s", lmodebuf, lparabuf);
732 cur_len = mlen;
733 mbuf = lmodebuf + mlen;
734 pbuf = lparabuf;
735 count = 0;
736 }
737
738 *mbuf++ = c;
739 cur_len += plen;
740 pbuf += sprintf(pbuf, "%s!%s@%s ", ban->name, ban->user, ban->host);
741 ++count;
742
743 remove_ban(ban, list);
744 }
745
746 *mbuf = *(pbuf - 1) = '\0';
747 sendto_channel_local(NULL, chptr, 0, 0, 0, "%s %s", lmodebuf, lparabuf);
748 }
749
750 static struct Message sjoin_msgtab =
751 {
752 .cmd = "SJOIN",
753 .args_min = 5,
754 .args_max = MAXPARA,
755 .handlers[UNREGISTERED_HANDLER] = m_unregistered,
756 .handlers[CLIENT_HANDLER] = m_ignore,
757 .handlers[SERVER_HANDLER] = ms_sjoin,
758 .handlers[ENCAP_HANDLER] = m_ignore,
759 .handlers[OPER_HANDLER] = m_ignore
760 };
761
762 static void
763 module_init(void)
764 {
765 mod_add_cmd(&sjoin_msgtab);
766 }
767
768 static void
769 module_exit(void)
770 {
771 mod_del_cmd(&sjoin_msgtab);
772 }
773
774 struct module module_entry =
775 {
776 .version = "$Revision$",
777 .modinit = module_init,
778 .modexit = module_exit,
779 .flags = MODULE_FLAG_CORE
780 };

Properties

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