#include <sys/stat.h>
#include "src/mod/module.h"
#include "channels.h"
#include "cmdschan.c"
#include "tclchan.c"
#include "userchan.c"
#include "udefchan.c"
Go to the source code of this file.
Defines | |
#define | MODULE_NAME "channels" |
#define | MAKING_CHANNELS |
#define | PLSMNS(x) (x ? '+' : '-') |
Functions | |
static void * | channel_malloc (int size, char *file, int line) |
static void | set_mode_protect (struct chanset_t *chan, char *set) |
static void | get_mode_protect (struct chanset_t *chan, char *s) |
static int | ismodeline (masklist *m, char *user) |
static int | ismasked (masklist *m, char *user) |
static int | chanset_unlink (struct chanset_t *chan) |
static void | remove_channel (struct chanset_t *chan) |
static int | channels_chon (char *handle, int idx) |
static char * | convert_element (char *src, char *dst) |
static void | write_channels () |
static void | read_channels (int create, int reload) |
static void | backup_chanfile () |
static void | channels_prerehash () |
static void | channels_rehash () |
static void | channels_report (int idx, int details) |
static int | expmem_masklist (masklist *m) |
static int | channels_expmem () |
static char * | traced_globchanset (ClientData cdata, Tcl_Interp *irp, char *name1, char *name2, int flags) |
static char * | channels_close () |
EXPORT_SCOPE char * | channels_start () |
char * | channels_start (Function *global_funcs) |
Variables | |
static Function * | global = 0 |
static char | chanfile [121] |
static char | glob_chanmode [64] |
static char * | lastdeletedmask |
static struct udef_struct * | udef |
static int | use_info |
static int | chan_hack |
static int | quiet_save |
static int | global_revenge_mode |
static int | global_stopnethack_mode |
static int | global_idle_kick |
static int | global_aop_min |
static int | global_aop_max |
static int | global_ban_time |
static int | global_exempt_time |
static int | global_invite_time |
static int | global_ban_type |
static int | allow_ps |
static char | glob_chanset [512] |
static int | gfld_chan_thr |
static int | gfld_chan_time |
static int | gfld_deop_thr |
static int | gfld_deop_time |
static int | gfld_kick_thr |
static int | gfld_kick_time |
static int | gfld_join_thr |
static int | gfld_join_time |
static int | gfld_ctcp_thr |
static int | gfld_ctcp_time |
static int | gfld_nick_thr |
static int | gfld_nick_time |
static cmd_t | my_chon [] |
static tcl_ints | my_tcl_ints [] |
static tcl_coups | mychan_tcl_coups [] |
static tcl_strings | my_tcl_strings [] |
static Function | channels_table [] |
#define MAKING_CHANNELS |
Definition at line 27 of file channels.c.
#define MODULE_NAME "channels" |
Definition at line 26 of file channels.c.
#define PLSMNS | ( | x | ) | (x ? '+' : '-') |
Definition at line 379 of file channels.c.
Referenced by write_channels().
static void backup_chanfile | ( | ) | [static] |
Definition at line 531 of file channels.c.
References chanfile, copyfile, egg_snprintf, LOG_MISC, putlog, and quiet_save.
Referenced by channels_close(), and channels_start().
00532 { 00533 char s[125]; 00534 00535 if (quiet_save < 2) 00536 putlog(LOG_MISC, "*", "Backing up channel file..."); 00537 egg_snprintf(s, sizeof s, "%s~bak", chanfile); 00538 copyfile(chanfile, s); 00539 }
static void* channel_malloc | ( | int | size, | |
char * | file, | |||
int | line | |||
) | [static] |
Definition at line 59 of file channels.c.
References egg_bzero, global, MODULE_NAME, and nmalloc.
Referenced by got475(), killmember(), newmask(), newmember(), real_add_mode(), reset_chan_info(), set_key(), and set_topic().
00060 { 00061 char *p; 00062 00063 #ifdef DEBUG_MEM 00064 p = ((void *) (global[0] (size, MODULE_NAME, file, line))); 00065 #else 00066 p = nmalloc(size); 00067 #endif 00068 egg_bzero(p, size); 00069 return p; 00070 }
static int channels_chon | ( | char * | handle, | |
int | idx | |||
) | [static] |
Definition at line 328 of file channels.c.
References flag_record::chan, chan_master, chan_owner, chanset, dcc, DCC_CHAT, chanset_t::dname, findchan_by_dname, FR_ANYWH, FR_CHAN, FR_GLOBAL, get_user_flagrec, glob_op, flag_record::match, chanset_t::next, NULL, chanset_t::type, user, USER_MASTER, USER_OP, and USER_OWNER.
00329 { 00330 struct flag_record fr = { FR_CHAN | FR_ANYWH | FR_GLOBAL, 0, 0, 0, 0, 0 }; 00331 int find, found = 0; 00332 struct chanset_t *chan = chanset; 00333 00334 if (dcc[idx].type == &DCC_CHAT) { 00335 if (!findchan_by_dname(dcc[idx].u.chat->con_chan) && 00336 ((dcc[idx].u.chat->con_chan[0] != '*') || 00337 (dcc[idx].u.chat->con_chan[1] != 0))) { 00338 get_user_flagrec(dcc[idx].user, &fr, NULL); 00339 if (glob_op(fr)) 00340 found = 1; 00341 if (chan_owner(fr)) 00342 find = USER_OWNER; 00343 else if (chan_master(fr)) 00344 find = USER_MASTER; 00345 else 00346 find = USER_OP; 00347 fr.match = FR_CHAN; 00348 while (chan && !found) { 00349 get_user_flagrec(dcc[idx].user, &fr, chan->dname); 00350 if (fr.chan & find) 00351 found = 1; 00352 else 00353 chan = chan->next; 00354 } 00355 if (!chan) 00356 chan = chanset; 00357 if (chan) 00358 strcpy(dcc[idx].u.chat->con_chan, chan->dname); 00359 else 00360 strcpy(dcc[idx].u.chat->con_chan, "*"); 00361 } 00362 } 00363 return 0; 00364 }
static char* channels_close | ( | ) | [static] |
Definition at line 845 of file channels.c.
References backup_chanfile(), C_dcc_irc, channels_prerehash(), channels_rehash(), channels_writeuserfile(), check_expired_bans(), check_expired_exempts(), check_expired_invites(), del_hook, free_udef(), H_chon, H_dcc, HOOK_BACKUP, HOOK_MINUTELY, HOOK_PRE_REHASH, HOOK_REHASH, HOOK_USERFILE, interp, lastdeletedmask, MODULE_NAME, module_undepend, nfree, NULL, rem_builtins, rem_help_reference, rem_tcl_commands, rem_tcl_coups, rem_tcl_ints, rem_tcl_strings, traced_globchanset(), and write_channels().
00846 { 00847 write_channels(); 00848 free_udef(udef); 00849 if (lastdeletedmask) 00850 nfree(lastdeletedmask); 00851 rem_builtins(H_chon, my_chon); 00852 rem_builtins(H_dcc, C_dcc_irc); 00853 rem_tcl_commands(channels_cmds); 00854 rem_tcl_strings(my_tcl_strings); 00855 rem_tcl_ints(my_tcl_ints); 00856 rem_tcl_coups(mychan_tcl_coups); 00857 del_hook(HOOK_USERFILE, (Function) channels_writeuserfile); 00858 del_hook(HOOK_BACKUP, (Function) backup_chanfile); 00859 del_hook(HOOK_REHASH, (Function) channels_rehash); 00860 del_hook(HOOK_PRE_REHASH, (Function) channels_prerehash); 00861 del_hook(HOOK_MINUTELY, (Function) check_expired_bans); 00862 del_hook(HOOK_MINUTELY, (Function) check_expired_exempts); 00863 del_hook(HOOK_MINUTELY, (Function) check_expired_invites); 00864 Tcl_UntraceVar(interp, "global-chanset", 00865 TCL_TRACE_READS | TCL_TRACE_WRITES | TCL_TRACE_UNSETS, 00866 traced_globchanset, NULL); 00867 rem_help_reference("channels.help"); 00868 rem_help_reference("chaninfo.help"); 00869 module_undepend(MODULE_NAME); 00870 return NULL; 00871 }
static int channels_expmem | ( | ) | [static] |
Definition at line 739 of file channels.c.
References chan_t::ban, chanset_t::channel, chanset, chanset_t::cmode, chan_t::exempt, expmem_masklist(), expmem_udef(), chan_t::invite, chanset_t::key, chan_t::key, lastdeletedmask, chan_t::members, MODES_PER_LINE_MAX, chanset_t::next, chanset_t::op, chanset_t::rmkey, and chan_t::topic.
00740 { 00741 int tot = 0, i; 00742 struct chanset_t *chan; 00743 00744 for (chan = chanset; chan; chan = chan->next) { 00745 tot += sizeof(struct chanset_t); 00746 00747 tot += strlen(chan->channel.key) + 1; 00748 if (chan->channel.topic) 00749 tot += strlen(chan->channel.topic) + 1; 00750 tot += (sizeof(struct memstruct) * (chan->channel.members + 1)); 00751 00752 tot += expmem_masklist(chan->channel.ban); 00753 tot += expmem_masklist(chan->channel.exempt); 00754 tot += expmem_masklist(chan->channel.invite); 00755 00756 for (i = 0; i < MODES_PER_LINE_MAX && chan->cmode[i].op; i++) 00757 tot += strlen(chan->cmode[i].op) + 1; 00758 if (chan->key) 00759 tot += strlen(chan->key) + 1; 00760 if (chan->rmkey) 00761 tot += strlen(chan->rmkey) + 1; 00762 } 00763 tot += expmem_udef(udef); 00764 if (lastdeletedmask) 00765 tot += strlen(lastdeletedmask) + 1; 00766 return tot; 00767 }
static void channels_prerehash | ( | ) | [static] |
Definition at line 541 of file channels.c.
References write_channels().
Referenced by channels_close(), and channels_start().
00542 { 00543 write_channels(); 00544 }
static void channels_rehash | ( | ) | [static] |
Definition at line 546 of file channels.c.
References read_channels(), and write_channels().
Referenced by channels_close(), and channels_start().
00547 { 00548 /* add channels from the chanfile but don't remove missing ones */ 00549 read_channels(1, 0); 00550 write_channels(); 00551 }
static void channels_report | ( | int | idx, | |
int | details | |||
) | [static] |
Definition at line 558 of file channels.c.
References chanset_t::ban_time, chanset_t::ban_type, chan_master, chanset_t::channel, channel_active, channel_autohalfop, channel_autoop, channel_autovoice, channel_bitch, channel_cycle, channel_dontkickops, channel_dynamicbans, channel_dynamicexempts, channel_dynamicinvites, channel_enforcebans, channel_greet, channel_inactive, channel_logstatus, channel_nodesynch, channel_nouserbans, channel_nouserexempts, channel_nouserinvites, channel_pending, channel_protectfriends, channel_protecthalfops, channel_protectops, channel_revenge, channel_secret, channel_seen, channel_shared, channel_static, chanset, dcc, chanset_t::dname, DP_STDOUT, dprintf, chanset_t::exempt_time, FR_CHAN, FR_GLOBAL, get_mode_protect(), get_user_flagrec, glob_master, chanset_t::idle_kick, chanset_t::invite_time, chan_t::members, my_strcpy, chanset_t::name, chanset_t::need_invite, chanset_t::need_key, chanset_t::need_limit, chanset_t::need_op, chanset_t::need_unban, chanset_t::next, chanset_t::revenge_mode, chanset_t::stopnethack_mode, and user.
00559 { 00560 int i; 00561 char s[1024], s1[100], s2[100]; 00562 struct chanset_t *chan; 00563 struct flag_record fr = { FR_CHAN | FR_GLOBAL, 0, 0, 0, 0, 0 }; 00564 00565 for (chan = chanset; chan; chan = chan->next) { 00566 00567 /* Get user's flags if output isn't going to stdout */ 00568 if (idx != DP_STDOUT) 00569 get_user_flagrec(dcc[idx].user, &fr, chan->dname); 00570 00571 /* Don't show channel information to someone who isn't a master */ 00572 if ((idx != DP_STDOUT) && !glob_master(fr) && !chan_master(fr)) 00573 continue; 00574 00575 s[0] = 0; 00576 00577 sprintf(s, " %-20s: ", chan->dname); 00578 00579 if (channel_inactive(chan)) 00580 strcat(s, "(inactive)"); 00581 else if (channel_pending(chan)) 00582 strcat(s, "(pending)"); 00583 else if (!channel_active(chan)) 00584 strcat(s, "(not on channel)"); 00585 else { 00586 00587 s1[0] = 0; 00588 sprintf(s1, "%3d member%s", chan->channel.members, 00589 (chan->channel.members == 1) ? "" : "s"); 00590 strcat(s, s1); 00591 00592 s2[0] = 0; 00593 get_mode_protect(chan, s2); 00594 00595 if (s2[0]) { 00596 s1[0] = 0; 00597 sprintf(s1, ", enforcing \"%s\"", s2); 00598 strcat(s, s1); 00599 } 00600 00601 s2[0] = 0; 00602 00603 if (channel_greet(chan)) 00604 strcat(s2, "greet, "); 00605 if (channel_autoop(chan)) 00606 strcat(s2, "auto-op, "); 00607 if (channel_bitch(chan)) 00608 strcat(s2, "bitch, "); 00609 00610 if (s2[0]) { 00611 s2[strlen(s2) - 2] = 0; 00612 00613 s1[0] = 0; 00614 sprintf(s1, " (%s)", s2); 00615 strcat(s, s1); 00616 } 00617 00618 /* If it's a !chan, we want to display it's unique name too <cybah> */ 00619 if (chan->dname[0] == '!') { 00620 s1[0] = 0; 00621 sprintf(s1, ", unique name %s", chan->name); 00622 strcat(s, s1); 00623 } 00624 } 00625 00626 dprintf(idx, "%s\n", s); 00627 00628 if (details) { 00629 s[0] = 0; 00630 i = 0; 00631 00632 if (channel_enforcebans(chan)) 00633 i += my_strcpy(s + i, "enforcebans "); 00634 if (channel_dynamicbans(chan)) 00635 i += my_strcpy(s + i, "dynamicbans "); 00636 if (!channel_nouserbans(chan)) 00637 i += my_strcpy(s + i, "userbans "); 00638 if (channel_autoop(chan)) 00639 i += my_strcpy(s + i, "autoop "); 00640 if (channel_bitch(chan)) 00641 i += my_strcpy(s + i, "bitch "); 00642 if (channel_greet(chan)) 00643 i += my_strcpy(s + i, "greet "); 00644 if (channel_protectops(chan)) 00645 i += my_strcpy(s + i, "protectops "); 00646 if (channel_protecthalfops(chan)) 00647 i += my_strcpy(s + i, "protecthalfops "); 00648 if (channel_protectfriends(chan)) 00649 i += my_strcpy(s + i, "protectfriends "); 00650 if (channel_dontkickops(chan)) 00651 i += my_strcpy(s + i, "dontkickops "); 00652 if (channel_logstatus(chan)) 00653 i += my_strcpy(s + i, "statuslog "); 00654 if (channel_revenge(chan)) 00655 i += my_strcpy(s + i, "revenge "); 00656 if (channel_revenge(chan)) 00657 i += my_strcpy(s + i, "revengebot "); 00658 if (channel_secret(chan)) 00659 i += my_strcpy(s + i, "secret "); 00660 if (channel_shared(chan)) 00661 i += my_strcpy(s + i, "shared "); 00662 if (!channel_static(chan)) 00663 i += my_strcpy(s + i, "dynamic "); 00664 if (channel_autovoice(chan)) 00665 i += my_strcpy(s + i, "autovoice "); 00666 if (channel_autohalfop(chan)) 00667 i += my_strcpy(s + i, "autohalfop "); 00668 if (channel_cycle(chan)) 00669 i += my_strcpy(s + i, "cycle "); 00670 if (channel_seen(chan)) 00671 i += my_strcpy(s + i, "seen "); 00672 if (channel_dynamicexempts(chan)) 00673 i += my_strcpy(s + i, "dynamicexempts "); 00674 if (!channel_nouserexempts(chan)) 00675 i += my_strcpy(s + i, "userexempts "); 00676 if (channel_dynamicinvites(chan)) 00677 i += my_strcpy(s + i, "dynamicinvites "); 00678 if (!channel_nouserinvites(chan)) 00679 i += my_strcpy(s + i, "userinvites "); 00680 if (channel_inactive(chan)) 00681 i += my_strcpy(s + i, "inactive "); 00682 if (channel_nodesynch(chan)) 00683 i += my_strcpy(s + i, "nodesynch "); 00684 00685 dprintf(idx, " Options: %s\n", s); 00686 00687 if (chan->need_op[0]) 00688 dprintf(idx, " To get ops, I do: %s\n", chan->need_op); 00689 00690 if (chan->need_invite[0]) 00691 dprintf(idx, " To get invited, I do: %s\n", chan->need_invite); 00692 00693 if (chan->need_limit[0]) 00694 dprintf(idx, " To get the channel limit raised, I do: %s\n", 00695 chan->need_limit); 00696 00697 if (chan->need_unban[0]) 00698 dprintf(idx, " To get unbanned, I do: %s\n", chan->need_unban); 00699 00700 if (chan->need_key[0]) 00701 dprintf(idx, " To get the channel key, I do: %s\n", 00702 chan->need_key); 00703 00704 if (chan->idle_kick) 00705 dprintf(idx, " Kicking idle users after %d minute%s\n", 00706 chan->idle_kick, (chan->idle_kick != 1) ? "s" : ""); 00707 00708 if (chan->stopnethack_mode) 00709 dprintf(idx, " stopnethack-mode: %d\n", chan->stopnethack_mode); 00710 00711 if (chan->revenge_mode) 00712 dprintf(idx, " revenge-mode: %d\n", chan->revenge_mode); 00713 00714 dprintf(idx, " ban-type: %d\n", chan->ban_type); 00715 dprintf(idx, " Bans last %d minute%s.\n", chan->ban_time, 00716 (chan->ban_time == 1) ? "" : "s"); 00717 dprintf(idx, " Exemptions last %d minute%s.\n", chan->exempt_time, 00718 (chan->exempt_time == 1) ? "" : "s"); 00719 dprintf(idx, " Invitations last %d minute%s.\n", chan->invite_time, 00720 (chan->invite_time == 1) ? "" : "s"); 00721 } 00722 } 00723 }
char* channels_start | ( | Function * | global_funcs | ) |
Definition at line 940 of file channels.c.
References add_builtins, add_help_reference, add_hook, add_tcl_commands, add_tcl_coups, add_tcl_ints, add_tcl_strings, allow_ps, backup_chanfile(), C_dcc_irc, chan_hack, chanfile, channels_prerehash(), channels_rehash(), channels_writeuserfile(), check_expired_bans(), check_expired_exempts(), check_expired_invites(), gfld_chan_thr, gfld_chan_time, gfld_ctcp_thr, gfld_ctcp_time, gfld_deop_thr, gfld_deop_time, gfld_join_thr, gfld_join_time, gfld_kick_thr, gfld_kick_time, glob_chanmode, glob_chanset, global, global_aop_max, global_aop_min, global_ban_time, global_ban_type, global_exempt_time, global_idle_kick, global_invite_time, global_revenge_mode, global_stopnethack_mode, H_chon, H_dcc, HOOK_BACKUP, HOOK_MINUTELY, HOOK_PRE_REHASH, HOOK_REHASH, HOOK_USERFILE, interp, lastdeletedmask, module_depend, MODULE_NAME, module_register, module_undepend, NULL, quiet_save, read_channels(), share_greet, traced_globchanset(), use_info, and _tcl_int::val.
00941 { 00942 global = global_funcs; 00943 00944 gfld_chan_thr = 10; 00945 gfld_chan_time = 60; 00946 gfld_deop_thr = 3; 00947 gfld_deop_time = 10; 00948 gfld_kick_thr = 3; 00949 gfld_kick_time = 10; 00950 gfld_join_thr = 5; 00951 gfld_join_time = 60; 00952 gfld_ctcp_thr = 5; 00953 gfld_ctcp_time = 60; 00954 global_idle_kick = 0; 00955 global_aop_min = 5; 00956 global_aop_max = 30; 00957 allow_ps = 0; 00958 lastdeletedmask = 0; 00959 use_info = 1; 00960 strcpy(chanfile, "chanfile"); 00961 chan_hack = 0; 00962 quiet_save = 0; 00963 strcpy(glob_chanmode, "nt"); 00964 udef = NULL; 00965 global_stopnethack_mode = 0; 00966 global_revenge_mode = 0; 00967 global_ban_type = 3; 00968 global_ban_time = 120; 00969 global_exempt_time = 60; 00970 global_invite_time = 60; 00971 strcpy(glob_chanset, 00972 "-enforcebans " 00973 "+dynamicbans " 00974 "+userbans " 00975 "-autoop " 00976 "-bitch " 00977 "+greet " 00978 "+protectops " 00979 "+statuslog " 00980 "-revenge " 00981 "-secret " 00982 "-autovoice " 00983 "+cycle " 00984 "+dontkickops " 00985 "-inactive " 00986 "-protectfriends " 00987 "+shared " 00988 "-seen " 00989 "+userexempts " 00990 "+dynamicexempts " 00991 "+userinvites " 00992 "+dynamicinvites " 00993 "-revengebot " 00994 "-protecthalfops " 00995 "-autohalfop " 00996 "-nodesynch " 00997 "-static "); 00998 module_register(MODULE_NAME, channels_table, 1, 1); 00999 if (!module_depend(MODULE_NAME, "eggdrop", 106, 20)) { 01000 module_undepend(MODULE_NAME); 01001 return "This module requires Eggdrop 1.6.20 or later."; 01002 } 01003 add_hook(HOOK_MINUTELY, (Function) check_expired_bans); 01004 add_hook(HOOK_MINUTELY, (Function) check_expired_exempts); 01005 add_hook(HOOK_MINUTELY, (Function) check_expired_invites); 01006 add_hook(HOOK_USERFILE, (Function) channels_writeuserfile); 01007 add_hook(HOOK_BACKUP, (Function) backup_chanfile); 01008 add_hook(HOOK_REHASH, (Function) channels_rehash); 01009 add_hook(HOOK_PRE_REHASH, (Function) channels_prerehash); 01010 Tcl_TraceVar(interp, "global-chanset", 01011 TCL_TRACE_READS | TCL_TRACE_WRITES | TCL_TRACE_UNSETS, 01012 traced_globchanset, NULL); 01013 add_builtins(H_chon, my_chon); 01014 add_builtins(H_dcc, C_dcc_irc); 01015 add_tcl_commands(channels_cmds); 01016 add_tcl_strings(my_tcl_strings); 01017 add_help_reference("channels.help"); 01018 add_help_reference("chaninfo.help"); 01019 my_tcl_ints[0].val = &share_greet; 01020 add_tcl_ints(my_tcl_ints); 01021 add_tcl_coups(mychan_tcl_coups); 01022 read_channels(0, 1); 01023 return NULL; 01024 }
EXPORT_SCOPE char* channels_start | ( | ) |
static int chanset_unlink | ( | struct chanset_t * | chan | ) | [inline, static] |
Definition at line 268 of file channels.c.
References chanset, chanset_t::next, and NULL.
Referenced by remove_channel().
00269 { 00270 struct chanset_t *c, *c_old = NULL; 00271 00272 for (c = chanset; c; c_old = c, c = c->next) { 00273 if (c == chan) { 00274 if (c_old) 00275 c_old->next = c->next; 00276 else 00277 chanset = c->next; 00278 return 1; 00279 } 00280 } 00281 return 0; 00282 }
static char* convert_element | ( | char * | src, | |
char * | dst | |||
) | [static] |
Definition at line 366 of file channels.c.
Referenced by write_channels().
00367 { 00368 int flags; 00369 00370 Tcl_ScanElement(src, &flags); 00371 /* Work around Tcl bug 3371644 (only present in 8.5.10) */ 00372 #ifdef TCL_DONT_QUOTE_HASH 00373 flags |= TCL_DONT_QUOTE_HASH; 00374 #endif 00375 Tcl_ConvertElement(src, dst, flags); 00376 return dst; 00377 }
static int expmem_masklist | ( | masklist * | m | ) | [static] |
Definition at line 725 of file channels.c.
References maskstruct::mask, maskstruct::next, and maskstruct::who.
Referenced by channels_expmem().
00726 { 00727 int result = 0; 00728 00729 for (; m; m = m->next) { 00730 result += sizeof(masklist); 00731 if (m->mask) 00732 result += strlen(m->mask) + 1; 00733 if (m->who) 00734 result += strlen(m->who) + 1; 00735 } 00736 return result; 00737 }
static void get_mode_protect | ( | struct chanset_t * | chan, | |
char * | s | |||
) | [static] |
Definition at line 175 of file channels.c.
References CHANANON, CHANDELJN, CHANINV, CHANKEY, CHANLIMIT, CHANLONLY, CHANMODER, CHANMODREG, CHANNOAMSG, CHANNOCLR, CHANNOCTCP, CHANNOMSG, CHANNONOTC, CHANPRIV, CHANQUIET, CHANREGON, CHANSEC, CHANSTRIP, CHANTOPIC, chanset_t::key_prot, chanset_t::limit_prot, chanset_t::mode_mns_prot, and chanset_t::mode_pls_prot.
Referenced by channels_report(), cmd_chaninfo(), and write_channels().
00176 { 00177 char *p = s, s1[121]; 00178 int i, tst; 00179 00180 s1[0] = 0; 00181 for (i = 0; i < 2; i++) { 00182 if (i == 0) { 00183 tst = chan->mode_pls_prot; 00184 if ((tst) || (chan->limit_prot != 0) || (chan->key_prot[0])) 00185 *p++ = '+'; 00186 if (chan->limit_prot != 0) { 00187 *p++ = 'l'; 00188 sprintf(&s1[strlen(s1)], "%d ", chan->limit_prot); 00189 } 00190 if (chan->key_prot[0]) { 00191 *p++ = 'k'; 00192 sprintf(&s1[strlen(s1)], "%s ", chan->key_prot); 00193 } 00194 } else { 00195 tst = chan->mode_mns_prot; 00196 if (tst) 00197 *p++ = '-'; 00198 if (tst & CHANKEY) 00199 *p++ = 'k'; 00200 if (tst & CHANLIMIT) 00201 *p++ = 'l'; 00202 } 00203 if (tst & CHANINV) 00204 *p++ = 'i'; 00205 if (tst & CHANPRIV) 00206 *p++ = 'p'; 00207 if (tst & CHANSEC) 00208 *p++ = 's'; 00209 if (tst & CHANMODER) 00210 *p++ = 'm'; 00211 if (tst & CHANNOCLR) 00212 *p++ = 'c'; 00213 if (tst & CHANNOCTCP) 00214 *p++ = 'C'; 00215 if (tst & CHANREGON) 00216 *p++ = 'R'; 00217 if (tst & CHANMODREG) 00218 *p++ = 'M'; 00219 if (tst & CHANLONLY) 00220 *p++ = 'r'; 00221 if (tst & CHANDELJN) 00222 *p++ = 'D'; 00223 if (tst & CHANSTRIP) 00224 *p++ = 'u'; 00225 if (tst & CHANNONOTC) 00226 *p++ = 'N'; 00227 if (tst & CHANNOAMSG) 00228 *p++ = 'T'; 00229 if (tst & CHANTOPIC) 00230 *p++ = 't'; 00231 if (tst & CHANNOMSG) 00232 *p++ = 'n'; 00233 if (tst & CHANANON) 00234 *p++ = 'a'; 00235 if (tst & CHANQUIET) 00236 *p++ = 'q'; 00237 } 00238 *p = 0; 00239 if (s1[0]) { 00240 s1[strlen(s1) - 1] = 0; 00241 strcat(s, " "); 00242 strcat(s, s1); 00243 } 00244 }
static int ismasked | ( | masklist * | m, | |
char * | user | |||
) | [static] |
Definition at line 258 of file channels.c.
References maskstruct::mask, match_addr, and maskstruct::next.
00259 { 00260 for (; m && m->mask[0]; m = m->next) 00261 if (match_addr(m->mask, user)) 00262 return 1; 00263 return 0; 00264 }
static int ismodeline | ( | masklist * | m, | |
char * | user | |||
) | [static] |
Definition at line 248 of file channels.c.
References maskstruct::mask, maskstruct::next, and rfc_casecmp.
00249 { 00250 for (; m && m->mask[0]; m = m->next) 00251 if (!rfc_casecmp(m->mask, user)) 00252 return 1; 00253 return 0; 00254 }
static void read_channels | ( | int | create, | |
int | reload | |||
) | [static] |
Definition at line 495 of file channels.c.
References CHAN_FLAGGED, chan_hack, chanfile, chanset, chanset_t::dname, LOG_MISC, chanset_t::next, putlog, readtclprog, remove_channel(), and chanset_t::status.
Referenced by channels_rehash(), channels_start(), and cmd_chanload().
00496 { 00497 struct chanset_t *chan, *chan_next; 00498 00499 if (!chanfile[0]) 00500 return; 00501 00502 if (reload) 00503 for (chan = chanset; chan; chan = chan->next) 00504 chan->status |= CHAN_FLAGGED; 00505 00506 chan_hack = 1; 00507 if (!readtclprog(chanfile) && create) { 00508 FILE *f; 00509 00510 /* Assume file isnt there & therfore make it */ 00511 putlog(LOG_MISC, "*", "Creating channel file"); 00512 f = fopen(chanfile, "w"); 00513 if (!f) 00514 putlog(LOG_MISC, "*", "Couldn't create channel file: %s. Dropping", 00515 chanfile); 00516 else 00517 fclose(f); 00518 } 00519 chan_hack = 0; 00520 if (!reload) 00521 return; 00522 for (chan = chanset; chan; chan = chan_next) { 00523 chan_next = chan->next; 00524 if (chan->status & CHAN_FLAGGED) { 00525 putlog(LOG_MISC, "*", "No longer supporting channel %s", chan->dname); 00526 remove_channel(chan); 00527 } 00528 } 00529 }
static void remove_channel | ( | struct chanset_t * | chan | ) | [static] |
Definition at line 289 of file channels.c.
References chanset_t::bans, chanset_t::channel, chanset_unlink(), clear_channel(), chanset_t::cmode, chanset_t::dname, chanset_t::exempts, _module_entry::funcs, chanset_t::invites, IRC_DO_CHANNEL_PART, chanset_t::key, chan_t::key, maskrec::mask, MODES_PER_LINE_MAX, module_find, nfree, noshare, NULL, chanset_t::op, chanset_t::rmkey, u_delban(), u_delexempt(), u_delinvite(), user_del_chan, and void().
Referenced by cmd_mns_chan(), and read_channels().
00290 { 00291 int i; 00292 module_entry *me; 00293 00294 /* Remove the channel from the list, so that noone can pull it 00295 * away from under our feet during the check_tcl_part() call. */ 00296 (void) chanset_unlink(chan); 00297 00298 if ((me = module_find("irc", 1, 3)) != NULL) 00299 (me->funcs[IRC_DO_CHANNEL_PART]) (chan); 00300 00301 clear_channel(chan, 0); 00302 noshare = 1; 00303 /* Remove channel-bans */ 00304 while (chan->bans) 00305 u_delban(chan, chan->bans->mask, 1); 00306 /* Remove channel-exempts */ 00307 while (chan->exempts) 00308 u_delexempt(chan, chan->exempts->mask, 1); 00309 /* Remove channel-invites */ 00310 while (chan->invites) 00311 u_delinvite(chan, chan->invites->mask, 1); 00312 /* Remove channel specific user flags */ 00313 user_del_chan(chan->dname); 00314 noshare = 0; 00315 nfree(chan->channel.key); 00316 for (i = 0; i < MODES_PER_LINE_MAX && chan->cmode[i].op; i++) 00317 nfree(chan->cmode[i].op); 00318 if (chan->key) 00319 nfree(chan->key); 00320 if (chan->rmkey) 00321 nfree(chan->rmkey); 00322 nfree(chan); 00323 }
static void set_mode_protect | ( | struct chanset_t * | chan, | |
char * | set | |||
) | [static] |
Definition at line 72 of file channels.c.
References allow_ps, CHANANON, CHANDELJN, CHANINV, CHANKEY, CHANLIMIT, CHANLONLY, CHANMODER, CHANMODREG, CHANNOAMSG, CHANNOCLR, CHANNOCTCP, CHANNOMSG, CHANNONOTC, CHANPRIV, CHANQUIET, CHANREGON, CHANSEC, CHANSTRIP, CHANTOPIC, chanset_t::key_prot, chanset_t::limit_prot, chanset_t::mode_mns_prot, chanset_t::mode_pls_prot, and newsplit.
00073 { 00074 int i, pos = 1; 00075 char *s, *s1; 00076 00077 /* Clear old modes */ 00078 chan->mode_mns_prot = chan->mode_pls_prot = 0; 00079 chan->limit_prot = 0; 00080 chan->key_prot[0] = 0; 00081 for (s = newsplit(&set); *s; s++) { 00082 i = 0; 00083 switch (*s) { 00084 case '+': 00085 pos = 1; 00086 break; 00087 case '-': 00088 pos = 0; 00089 break; 00090 case 'i': 00091 i = CHANINV; 00092 break; 00093 case 'p': 00094 i = CHANPRIV; 00095 break; 00096 case 's': 00097 i = CHANSEC; 00098 break; 00099 case 'm': 00100 i = CHANMODER; 00101 break; 00102 case 'c': 00103 i = CHANNOCLR; 00104 break; 00105 case 'C': 00106 i = CHANNOCTCP; 00107 break; 00108 case 'R': 00109 i = CHANREGON; 00110 break; 00111 case 'M': 00112 i = CHANMODREG; 00113 break; 00114 case 'r': 00115 i = CHANLONLY; 00116 break; 00117 case 'D': 00118 i = CHANDELJN; 00119 break; 00120 case 'u': 00121 i = CHANSTRIP; 00122 break; 00123 case 'N': 00124 i = CHANNONOTC; 00125 break; 00126 case 'T': 00127 i = CHANNOAMSG; 00128 break; 00129 case 't': 00130 i = CHANTOPIC; 00131 break; 00132 case 'n': 00133 i = CHANNOMSG; 00134 break; 00135 case 'a': 00136 i = CHANANON; 00137 break; 00138 case 'q': 00139 i = CHANQUIET; 00140 break; 00141 case 'l': 00142 i = CHANLIMIT; 00143 chan->limit_prot = 0; 00144 if (pos) { 00145 s1 = newsplit(&set); 00146 if (s1[0]) 00147 chan->limit_prot = atoi(s1); 00148 } 00149 break; 00150 case 'k': 00151 i = CHANKEY; 00152 chan->key_prot[0] = 0; 00153 if (pos) { 00154 s1 = newsplit(&set); 00155 if (s1[0]) 00156 strcpy(chan->key_prot, s1); 00157 } 00158 break; 00159 } 00160 if (i) { 00161 if (pos) { 00162 chan->mode_pls_prot |= i; 00163 chan->mode_mns_prot &= ~i; 00164 } else { 00165 chan->mode_pls_prot &= ~i; 00166 chan->mode_mns_prot |= i; 00167 } 00168 } 00169 } 00170 /* Prevents a +s-p +p-s flood (fixed by drummer) */ 00171 if (chan->mode_pls_prot & CHANSEC && !allow_ps) 00172 chan->mode_pls_prot &= ~CHANPRIV; 00173 }
static char* traced_globchanset | ( | ClientData | cdata, | |
Tcl_Interp * | irp, | |||
char * | name1, | |||
char * | name2, | |||
int | flags | |||
) | [static] |
Definition at line 769 of file channels.c.
References EGG_CONST, glob_chanset, interp, NULL, and Tcl_Free.
Referenced by channels_close(), and channels_start().
00772 { 00773 int i, items; 00774 char *t, *s; 00775 EGG_CONST char **item, *s2; 00776 00777 if (flags & (TCL_TRACE_READS | TCL_TRACE_UNSETS)) { 00778 Tcl_SetVar2(interp, name1, name2, glob_chanset, TCL_GLOBAL_ONLY); 00779 if (flags & TCL_TRACE_UNSETS) 00780 Tcl_TraceVar(interp, "global-chanset", 00781 TCL_TRACE_READS | TCL_TRACE_WRITES | TCL_TRACE_UNSETS, 00782 traced_globchanset, NULL); 00783 } else { /* Write */ 00784 s2 = Tcl_GetVar2(interp, name1, name2, TCL_GLOBAL_ONLY); 00785 Tcl_SplitList(interp, s2, &items, &item); 00786 for (i = 0; i < items; i++) { 00787 if (!(item[i]) || (strlen(item[i]) < 2)) 00788 continue; 00789 s = glob_chanset; 00790 while (s[0]) { 00791 t = strchr(s, ' '); /* Can't be NULL coz of the extra space */ 00792 t[0] = 0; 00793 if (!strcmp(s + 1, item[i] + 1)) { 00794 s[0] = item[i][0]; /* +- */ 00795 t[0] = ' '; 00796 break; 00797 } 00798 t[0] = ' '; 00799 s = t + 1; 00800 } 00801 } 00802 if (item) /* hmm it cant be 0 */ 00803 Tcl_Free((char *) item); 00804 Tcl_SetVar2(interp, name1, name2, glob_chanset, TCL_GLOBAL_ONLY); 00805 } 00806 return NULL; 00807 }
static void write_channels | ( | void | ) | [static] |
Definition at line 387 of file channels.c.
References chanset_t::aop_max, chanset_t::aop_min, chanset_t::ban_time, chanset_t::ban_type, botnetnick, chanfile, channel_autohalfop, channel_autoop, channel_autovoice, channel_bitch, channel_cycle, channel_dontkickops, channel_dynamicbans, channel_dynamicexempts, channel_dynamicinvites, channel_enforcebans, channel_greet, channel_inactive, channel_logstatus, channel_nodesynch, channel_nouserbans, channel_nouserexempts, channel_nouserinvites, channel_protectfriends, channel_protecthalfops, channel_protectops, channel_revenge, channel_revengebot, channel_secret, channel_seen, channel_shared, channel_static, chanset, convert_element(), debug1, udef_struct::defined, chanset_t::dname, chanset_t::exempt_time, chanset_t::flood_ctcp_thr, chanset_t::flood_ctcp_time, chanset_t::flood_deop_thr, chanset_t::flood_deop_time, chanset_t::flood_join_thr, chanset_t::flood_join_time, chanset_t::flood_kick_thr, chanset_t::flood_kick_time, chanset_t::flood_nick_thr, chanset_t::flood_nick_time, chanset_t::flood_pub_thr, chanset_t::flood_pub_time, get_mode_protect(), getudef(), chanset_t::idle_kick, chanset_t::invite_time, LOG_MISC, movefile, udef_struct::name, chanset_t::name, chanset_t::need_invite, chanset_t::need_key, chanset_t::need_limit, chanset_t::need_op, chanset_t::need_unban, udef_struct::next, chanset_t::next, now, NULL, PLSMNS, putlog, quiet_save, chanset_t::revenge_mode, chanset_t::stopnethack_mode, udef_struct::type, UDEF_FLAG, UDEF_INT, UDEF_STR, userfile_perm, udef_struct::values, and ver.
Referenced by channels_close(), channels_prerehash(), channels_rehash(), channels_writeuserfile(), and cmd_chansave().
00388 { 00389 FILE *f; 00390 char s[121], w[1024], w2[1024], name[163]; 00391 char need1[242], need2[242], need3[242], need4[242], need5[242]; 00392 struct chanset_t *chan; 00393 struct udef_struct *ul; 00394 00395 if (!chanfile[0]) 00396 return; 00397 sprintf(s, "%s~new", chanfile); 00398 f = fopen(s, "w"); 00399 chmod(s, userfile_perm); 00400 if (f == NULL) { 00401 putlog(LOG_MISC, "*", "ERROR writing channel file."); 00402 return; 00403 } 00404 if (!quiet_save) 00405 putlog(LOG_MISC, "*", "Writing channel file..."); 00406 fprintf(f, "#Dynamic Channel File for %s (%s) -- written %s\n", 00407 botnetnick, ver, ctime(&now)); 00408 for (chan = chanset; chan; chan = chan->next) { 00409 convert_element(chan->dname, name); 00410 get_mode_protect(chan, w); 00411 convert_element(w, w2); 00412 convert_element(chan->need_op, need1); 00413 convert_element(chan->need_invite, need2); 00414 convert_element(chan->need_key, need3); 00415 convert_element(chan->need_unban, need4); 00416 convert_element(chan->need_limit, need5); 00417 fprintf(f, 00418 "channel add %s { chanmode %s idle-kick %d stopnethack-mode %d " 00419 "revenge-mode %d need-op %s need-invite %s need-key %s " 00420 "need-unban %s need-limit %s flood-chan %d:%d flood-ctcp %d:%d " 00421 "flood-join %d:%d flood-kick %d:%d flood-deop %d:%d " 00422 "flood-nick %d:%d aop-delay %d:%d ban-type %d ban-time %d " 00423 "exempt-time %d invite-time %d %cenforcebans %cdynamicbans " 00424 "%cuserbans %cautoop %cautohalfop %cbitch %cgreet %cprotectops " 00425 "%cprotecthalfops %cprotectfriends %cdontkickops %cstatuslog " 00426 "%crevenge %crevengebot %cautovoice %csecret %cshared %ccycle " 00427 "%cseen %cinactive %cdynamicexempts %cuserexempts %cdynamicinvites " 00428 "%cuserinvites %cnodesynch %cstatic }" "\n", 00429 name, w2, chan->idle_kick, chan->stopnethack_mode, 00430 chan->revenge_mode, need1, need2, need3, need4, need5, 00431 chan->flood_pub_thr, chan->flood_pub_time, 00432 chan->flood_ctcp_thr, chan->flood_ctcp_time, 00433 chan->flood_join_thr, chan->flood_join_time, 00434 chan->flood_kick_thr, chan->flood_kick_time, 00435 chan->flood_deop_thr, chan->flood_deop_time, 00436 chan->flood_nick_thr, chan->flood_nick_time, 00437 chan->aop_min, chan->aop_max, chan->ban_type, chan->ban_time, 00438 chan->exempt_time, chan->invite_time, 00439 PLSMNS(channel_enforcebans(chan)), 00440 PLSMNS(channel_dynamicbans(chan)), 00441 PLSMNS(!channel_nouserbans(chan)), 00442 PLSMNS(channel_autoop(chan)), 00443 PLSMNS(channel_autohalfop(chan)), 00444 PLSMNS(channel_bitch(chan)), 00445 PLSMNS(channel_greet(chan)), 00446 PLSMNS(channel_protectops(chan)), 00447 PLSMNS(channel_protecthalfops(chan)), 00448 PLSMNS(channel_protectfriends(chan)), 00449 PLSMNS(channel_dontkickops(chan)), 00450 PLSMNS(channel_logstatus(chan)), 00451 PLSMNS(channel_revenge(chan)), 00452 PLSMNS(channel_revengebot(chan)), 00453 PLSMNS(channel_autovoice(chan)), 00454 PLSMNS(channel_secret(chan)), 00455 PLSMNS(channel_shared(chan)), 00456 PLSMNS(channel_cycle(chan)), 00457 PLSMNS(channel_seen(chan)), 00458 PLSMNS(channel_inactive(chan)), 00459 PLSMNS(channel_dynamicexempts(chan)), 00460 PLSMNS(!channel_nouserexempts(chan)), 00461 PLSMNS(channel_dynamicinvites(chan)), 00462 PLSMNS(!channel_nouserinvites(chan)), 00463 PLSMNS(channel_nodesynch(chan)), 00464 PLSMNS(channel_static(chan))); 00465 for (ul = udef; ul; ul = ul->next) { 00466 if (ul->defined && ul->name) { 00467 if (ul->type == UDEF_FLAG) 00468 fprintf(f, "channel set %s %c%s%s\n", name, getudef(ul->values, 00469 chan->dname) ? '+' : '-', "udef-flag-", ul->name); 00470 else if (ul->type == UDEF_INT) 00471 fprintf(f, "channel set %s %s%s %d\n", name, "udef-int-", ul->name, 00472 (int) getudef(ul->values, chan->dname)); 00473 else if (ul->type == UDEF_STR) { 00474 char *p = (char *) getudef(ul->values, chan->dname); 00475 00476 if (!p) 00477 p = "{}"; 00478 00479 fprintf(f, "channel set %s udef-str-%s %s\n", name, ul->name, p); 00480 } else 00481 debug1("UDEF-ERROR: unknown type %d", ul->type); 00482 } 00483 } 00484 if (fflush(f)) { 00485 putlog(LOG_MISC, "*", "ERROR writing channel file."); 00486 fclose(f); 00487 return; 00488 } 00489 } 00490 fclose(f); 00491 unlink(chanfile); 00492 movefile(s, chanfile); 00493 }
int allow_ps [static] |
Definition at line 39 of file channels.c.
Referenced by channels_start(), and set_mode_protect().
int chan_hack [static] |
Definition at line 39 of file channels.c.
Referenced by channels_start(), and read_channels().
char chanfile[121] [static] |
Definition at line 34 of file channels.c.
Referenced by backup_chanfile(), channels_start(), cmd_chanload(), cmd_chansave(), read_channels(), and write_channels().
Function channels_table[] [static] |
Definition at line 875 of file channels.c.
int gfld_chan_thr [static] |
Definition at line 48 of file channels.c.
Referenced by channels_start().
int gfld_chan_time [static] |
Definition at line 48 of file channels.c.
Referenced by channels_start().
int gfld_ctcp_thr [static] |
Definition at line 48 of file channels.c.
Referenced by channels_start().
int gfld_ctcp_time [static] |
Definition at line 48 of file channels.c.
Referenced by channels_start().
int gfld_deop_thr [static] |
Definition at line 48 of file channels.c.
Referenced by channels_start().
int gfld_deop_time [static] |
Definition at line 48 of file channels.c.
Referenced by channels_start().
int gfld_join_thr [static] |
Definition at line 48 of file channels.c.
Referenced by channels_start().
int gfld_join_time [static] |
Definition at line 48 of file channels.c.
Referenced by channels_start().
int gfld_kick_thr [static] |
Definition at line 48 of file channels.c.
Referenced by channels_start().
int gfld_kick_time [static] |
Definition at line 48 of file channels.c.
Referenced by channels_start().
int gfld_nick_thr [static] |
Definition at line 48 of file channels.c.
int gfld_nick_time [static] |
Definition at line 48 of file channels.c.
char glob_chanmode[64] [static] |
Definition at line 34 of file channels.c.
Referenced by channels_start().
char glob_chanset[512] [static] |
Definition at line 45 of file channels.c.
Referenced by channels_start(), and traced_globchanset().
Function* global = 0 [static] |
Definition at line 32 of file channels.c.
int global_aop_max [static] |
Definition at line 39 of file channels.c.
Referenced by channels_start().
int global_aop_min [static] |
Definition at line 39 of file channels.c.
Referenced by channels_start().
int global_ban_time [static] |
Definition at line 39 of file channels.c.
Referenced by channels_start().
int global_ban_type [static] |
Definition at line 39 of file channels.c.
Referenced by channels_start().
int global_exempt_time [static] |
Definition at line 39 of file channels.c.
Referenced by channels_start().
int global_idle_kick [static] |
Definition at line 39 of file channels.c.
Referenced by channels_start().
int global_invite_time [static] |
Definition at line 39 of file channels.c.
Referenced by channels_start().
int global_revenge_mode [static] |
Definition at line 39 of file channels.c.
Referenced by channels_start().
int global_stopnethack_mode [static] |
Definition at line 39 of file channels.c.
Referenced by channels_start().
char* lastdeletedmask [static] |
Definition at line 35 of file channels.c.
Referenced by channels_close(), channels_expmem(), channels_start(), cmd_mns_ban(), cmd_mns_exempt(), cmd_mns_invite(), u_delban(), u_delexempt(), and u_delinvite().
{ {"*", "", (IntFunc) channels_chon, "channels:chon"}, { 0 , 0 , 0 , 0 } }
Definition at line 553 of file channels.c.
tcl_ints my_tcl_ints[] [static] |
{ {"share-greet", 0 , 0}, {"use-info", &use_info, 0}, {"quiet-save", &quiet_save, 0}, {"allow-ps", &allow_ps, 0}, {"global-stopnethack-mode", &global_stopnethack_mode, 0}, {"global-revenge-mode", &global_revenge_mode, 0}, {"global-idle-kick", &global_idle_kick, 0}, {"global-ban-time", &global_ban_time, 0}, {"global-exempt-time", &global_exempt_time, 0}, {"global-invite-time", &global_invite_time, 0}, {"global-ban-type", &global_ban_type, 0}, {"ban-time", &global_ban_time, 0}, {"exempt-time", &global_exempt_time, 0}, {"invite-time", &global_invite_time, 0}, { 0 , 0 , 0} }
Definition at line 809 of file channels.c.
tcl_strings my_tcl_strings[] [static] |
{ {"chanfile", chanfile, 120, 2 }, {"global-chanmode", glob_chanmode, 64, 0}, { 0 , 0 , 0, 0} }
Definition at line 839 of file channels.c.
tcl_coups mychan_tcl_coups[] [static] |
{ {"global-flood-chan", &gfld_chan_thr, &gfld_chan_time}, {"global-flood-deop", &gfld_deop_thr, &gfld_deop_time}, {"global-flood-kick", &gfld_kick_thr, &gfld_kick_time}, {"global-flood-join", &gfld_join_thr, &gfld_join_time}, {"global-flood-ctcp", &gfld_ctcp_thr, &gfld_ctcp_time}, {"global-flood-nick", &gfld_nick_thr, &gfld_nick_time}, {"global-aop-delay", &global_aop_min, &global_aop_max}, { 0 , 0 , 0 } }
Definition at line 828 of file channels.c.
int quiet_save [static] |
Definition at line 39 of file channels.c.
struct udef_struct* udef [static] |
Definition at line 37 of file channels.c.
Referenced by cmd_chaninfo(), initudef(), and ngetudef().
int use_info [static] |
Definition at line 39 of file channels.c.
Referenced by channels_start(), cmd_chinfo(), cmd_info(), gotjoin(), msg_info(), and msg_who().