Пример #1
0
char *notes_start(Function *global_funcs)
{

  global = global_funcs;

  notefile[0] = 0;
  module_register(MODULE_NAME, notes_table, 2, 2);
  if (!module_depend(MODULE_NAME, "eggdrop", 108, 0)) {
    module_undepend(MODULE_NAME);
    return "This module requires Eggdrop 1.8.0 or later.";
  }
  add_hook(HOOK_HOURLY, (Function) notes_hourly);
  add_hook(HOOK_MATCH_NOTEREJ, (Function) match_note_ignore);
  add_tcl_ints(notes_ints);
  add_tcl_strings(notes_strings);
  add_tcl_commands(notes_tcls);
  add_builtins(H_dcc, notes_cmds);
  add_builtins(H_chon, notes_chon);
  add_builtins(H_away, notes_away);
  add_builtins(H_nkch, notes_nkch);
  add_builtins(H_load, notes_load);
  add_help_reference("notes.help");
  add_lang_section("notes");
  notes_server_setup(0);
  notes_irc_setup(0);
  my_memcpy(&USERENTRY_FWD, &USERENTRY_INFO, sizeof(void *) * 12);
  add_entry_type(&USERENTRY_FWD);
  return NULL;
}
Пример #2
0
char *filesys_start(Function * global_funcs)
{
  global = global_funcs;

  Context;
  dccdir[0] = 0;
  dccin[0] = 0;
  filedb_path[0] = 0;
  module_register(MODULE_NAME, filesys_table, 2, 0);
  if (!(transfer_funcs = module_depend(MODULE_NAME, "transfer", 2, 0)))
    return "You need the transfer module to user the file system.";
  if (!module_depend(MODULE_NAME, "eggdrop", 104, 0))
    return "You need at least eggdrop1.4.0 to run this module.";
  add_tcl_commands(mytcls);
  add_tcl_strings(mystrings);
  add_tcl_ints(myints);
  H_fil = add_bind_table("fil", 0, builtin_fil);
  add_builtins(H_dcc, mydcc);
  add_builtins(H_fil, myfiles);
  add_builtins(H_load, myload);
  add_help_reference("filesys.help");
  init_server_ctcps(0);
  my_memcpy(&USERENTRY_DCCDIR, &USERENTRY_INFO,
	    sizeof(struct user_entry_type) - sizeof(char *));

  USERENTRY_DCCDIR.got_share = 0;	/* we dont want it shared tho */
  add_entry_type(&USERENTRY_DCCDIR);
  DCC_FILES_PASS.timeout_val = &password_timeout;
  add_lang_section("filesys");
  return NULL;
}
Пример #3
0
char *compress_start(Function *global_funcs)
{
  global = global_funcs;

  compressed_files = 0;
  uncompressed_files = 0;
  share_compressed = 0;
  compress_level = 9;

  module_register(MODULE_NAME, compress_table, 1, 1);
  if (!module_depend(MODULE_NAME, "eggdrop", 106, 0)) {
    module_undepend(MODULE_NAME);
    return "This module requires Eggdrop 1.6.0 or later.";
  }

  share_funcs = module_depend(MODULE_NAME, "share", 2, 3);
  if (!share_funcs) {
    module_undepend(MODULE_NAME);
    return "This module requires share module 2.3 or later.";
  }

  uff_addtable(compress_uff_table);
  add_tcl_ints(my_tcl_ints);
  add_tcl_commands(my_tcl_cmds);
  add_help_reference("compress.help");
  return NULL;
}
Пример #4
0
char *filesys_start(Function *global_funcs)
{
  global = global_funcs;

  module_register(MODULE_NAME, filesys_table, 2, 0);
  if (!module_depend(MODULE_NAME, "eggdrop", 106, 0)) {
    module_undepend(MODULE_NAME);
    return "This module requires Eggdrop 1.6.0 or later.";
  }
  if (!(transfer_funcs = module_depend(MODULE_NAME, "transfer", 2, 0))) {
    module_undepend(MODULE_NAME);
    return "This module requires transfer module 2.0 or later.";
  }
  add_tcl_commands(mytcls);
  add_tcl_strings(mystrings);
  add_tcl_ints(myints);
  H_fil = add_bind_table("fil", 0, builtin_fil);
  add_builtins(H_dcc, mydcc);
  add_builtins(H_fil, myfiles);
  add_builtins(H_load, myload);
  add_help_reference("filesys.help");
  init_server_ctcps(0);
  my_memcpy(&USERENTRY_DCCDIR, &USERENTRY_INFO,
            sizeof(struct user_entry_type) - sizeof(char *));

  USERENTRY_DCCDIR.got_share = 0;       /* We dont want it shared tho */
  add_entry_type(&USERENTRY_DCCDIR);
  DCC_FILES_PASS.timeout_val = &password_timeout;
  add_lang_section("filesys");
  return NULL;
}
Пример #5
0
char *assoc_start(Function *global_funcs)
{
  global = global_funcs;

  module_register(MODULE_NAME, assoc_table, 2, 0);
  if (!module_depend(MODULE_NAME, "eggdrop", 106, 0)) {
    module_undepend(MODULE_NAME);
    return "This module requires Eggdrop 1.6.0 or later.";
  }
  assoc = NULL;
  add_builtins(H_dcc, mydcc);
  add_builtins(H_bot, mybot);
  add_builtins(H_link, mylink);
  add_lang_section("assoc");
  add_tcl_commands(mytcl);
  add_help_reference("assoc.help");
  return NULL;
}
Пример #6
0
char *channels_start(Function * global_funcs)
{
  global = global_funcs;

  gfld_chan_thr = 10;
  gfld_chan_time = 60;
  gfld_deop_thr = 3;
  gfld_deop_time = 10;
  gfld_kick_thr = 3;
  gfld_kick_time = 10;
  gfld_join_thr = 5;
  gfld_join_time = 60;
  gfld_ctcp_thr = 5;
  gfld_ctcp_time = 60;
  global_idle_kick = 0;
  Context;
  module_register(MODULE_NAME, channels_table, 1, 0);
  if (!module_depend(MODULE_NAME, "eggdrop", 105, 3)) {
    module_undepend(MODULE_NAME);
    return "This module needs eggdrop1.5.3 or later";
  }
  add_hook(HOOK_MINUTELY, (Function) check_expired_bans);
  add_hook(HOOK_MINUTELY, (Function) check_expired_exempts);
  add_hook(HOOK_MINUTELY, (Function) check_expired_invites);
  add_hook(HOOK_USERFILE, (Function) channels_writeuserfile);
  add_hook(HOOK_REHASH, (Function) channels_rehash);
  add_hook(HOOK_PRE_REHASH, (Function) channels_prerehash);
  Tcl_TraceVar(interp, "global-chanset",
	       TCL_TRACE_READS | TCL_TRACE_WRITES | TCL_TRACE_UNSETS,
	       traced_globchanset, NULL);
  add_builtins(H_chon, my_chon);
  add_builtins(H_dcc, C_dcc_irc);
  add_tcl_commands(channels_cmds);
  add_tcl_strings(my_tcl_strings);
  add_help_reference("channels.help");
  add_help_reference("chaninfo.help");
  my_tcl_ints[0].val = &share_greet;
  add_tcl_ints(my_tcl_ints);
  add_tcl_coups(mychan_tcl_coups);
  read_channels(0);
  setstatic = 1;
  return NULL;
}
Пример #7
0
char *irc_start(Function *global_funcs)
{
    struct chanset_t *chan;

    global = global_funcs;

    module_register(MODULE_NAME, irc_table, 1, 5);
    if (!module_depend(MODULE_NAME, "eggdrop", 108, 0)) {
        module_undepend(MODULE_NAME);
        return "This module requires Eggdrop 1.8.0 or later.";
    }
    if (!(server_funcs = module_depend(MODULE_NAME, "server", 1, 0))) {
        module_undepend(MODULE_NAME);
        return "This module requires server module 1.0 or later.";
    }
    if (!(channels_funcs = module_depend(MODULE_NAME, "channels", 1, 1))) {
        module_undepend(MODULE_NAME);
        return "This module requires channels module 1.1 or later.";
    }
    for (chan = chanset; chan; chan = chan->next) {
        if (!channel_inactive(chan)) {
            if (chan->key_prot[0])
                dprintf(DP_SERVER, "JOIN %s %s\n",
                        chan->name[0] ? chan->name : chan->dname, chan->key_prot);
            else
                dprintf(DP_SERVER, "JOIN %s\n",
                        chan->name[0] ? chan->name : chan->dname);
        }
        chan->status &= ~(CHAN_ACTIVE | CHAN_PEND | CHAN_ASKEDBANS);
        chan->ircnet_status &= ~(CHAN_ASKED_INVITED | CHAN_ASKED_EXEMPTS);
    }
    add_hook(HOOK_MINUTELY, (Function) check_expired_chanstuff);
    add_hook(HOOK_5MINUTELY, (Function) status_log);
    add_hook(HOOK_ADD_MODE, (Function) real_add_mode);
    add_hook(HOOK_IDLE, (Function) flush_modes);
    Tcl_TraceVar(interp, "net-type",
                 TCL_TRACE_READS | TCL_TRACE_WRITES | TCL_TRACE_UNSETS,
                 traced_nettype, NULL);
    Tcl_TraceVar(interp, "rfc-compliant",
                 TCL_TRACE_READS | TCL_TRACE_WRITES | TCL_TRACE_UNSETS,
                 traced_rfccompliant, NULL);
    strcpy(opchars, "@");
    add_tcl_strings(mystrings);
    add_tcl_ints(myints);
    add_builtins(H_dcc, irc_dcc);
    add_builtins(H_msg, C_msg);
    add_builtins(H_raw, irc_raw);
    add_tcl_commands(tclchan_cmds);
    add_help_reference("irc.help");
    H_topc = add_bind_table("topc", HT_STACKABLE, channels_5char);
    H_splt = add_bind_table("splt", HT_STACKABLE, channels_4char);
    H_sign = add_bind_table("sign", HT_STACKABLE, channels_5char);
    H_rejn = add_bind_table("rejn", HT_STACKABLE, channels_4char);
    H_part = add_bind_table("part", HT_STACKABLE, channels_5char);
    H_nick = add_bind_table("nick", HT_STACKABLE, channels_5char);
    H_mode = add_bind_table("mode", HT_STACKABLE, channels_6char);
    H_kick = add_bind_table("kick", HT_STACKABLE, channels_6char);
    H_join = add_bind_table("join", HT_STACKABLE, channels_4char);
    H_pubm = add_bind_table("pubm", HT_STACKABLE, channels_5char);
    H_pub = add_bind_table("pub", 0, channels_5char);
    H_need = add_bind_table("need", HT_STACKABLE, channels_2char);
    do_nettype();
    return NULL;
}
Пример #8
0
char *channels_start(Function *global_funcs)
{
  global = global_funcs;

  gfld_chan_thr = 10;
  gfld_chan_time = 60;
  gfld_deop_thr = 3;
  gfld_deop_time = 10;
  gfld_kick_thr = 3;
  gfld_kick_time = 10;
  gfld_join_thr = 5;
  gfld_join_time = 60;
  gfld_ctcp_thr = 5;
  gfld_ctcp_time = 60;
  global_idle_kick = 0;
  global_aop_min = 5;
  global_aop_max = 30;
  allow_ps = 0;
  lastdeletedmask = 0;
  use_info = 1;
  strcpy(chanfile, "chanfile");
  chan_hack = 0;
  quiet_save = 0;
  strcpy(glob_chanmode, "nt");
  udef = NULL;
  global_stopnethack_mode = 0;
  global_revenge_mode = 0;
  global_ban_type = 3;
  global_ban_time = 120;
  global_exempt_time = 60;
  global_invite_time = 60;
  strcpy(glob_chanset,
         "-enforcebans "
         "+dynamicbans "
         "+userbans "
         "-autoop "
         "-bitch "
         "+greet "
         "+protectops "
         "+statuslog "
         "-revenge "
         "-secret "
         "-autovoice "
         "+cycle "
         "+dontkickops "
         "-inactive "
         "-protectfriends "
         "+shared "
         "-seen "
         "+userexempts "
         "+dynamicexempts "
         "+userinvites "
         "+dynamicinvites "
         "-revengebot "
         "-protecthalfops "
         "-autohalfop "
         "-nodesynch "
         "-static ");
  module_register(MODULE_NAME, channels_table, 1, 1);
  if (!module_depend(MODULE_NAME, "eggdrop", 106, 20)) {
    module_undepend(MODULE_NAME);
    return "This module requires Eggdrop 1.6.20 or later.";
  }
  add_hook(HOOK_MINUTELY, (Function) check_expired_bans);
  add_hook(HOOK_MINUTELY, (Function) check_expired_exempts);
  add_hook(HOOK_MINUTELY, (Function) check_expired_invites);
  add_hook(HOOK_USERFILE, (Function) channels_writeuserfile);
  add_hook(HOOK_BACKUP, (Function) backup_chanfile);
  add_hook(HOOK_REHASH, (Function) channels_rehash);
  add_hook(HOOK_PRE_REHASH, (Function) channels_prerehash);
  Tcl_TraceVar(interp, "global-chanset",
               TCL_TRACE_READS | TCL_TRACE_WRITES | TCL_TRACE_UNSETS,
               traced_globchanset, NULL);
  add_builtins(H_chon, my_chon);
  add_builtins(H_dcc, C_dcc_irc);
  add_tcl_commands(channels_cmds);
  add_tcl_strings(my_tcl_strings);
  add_help_reference("channels.help");
  add_help_reference("chaninfo.help");
  my_tcl_ints[0].val = &share_greet;
  add_tcl_ints(my_tcl_ints);
  add_tcl_coups(mychan_tcl_coups);
  read_channels(0, 1);
  return NULL;
}