Ignore:
Timestamp:
06/01/07 11:09:07 (5 years ago)
Author:
wd
Message:

Wow, a fully building ircd mode (so far). Some changes:

  • Updated LOTS of copyright notices.
  • Completed the split of channel and user modes
  • That core 'addon' is completely gone
  • Using hard/soft/post dependencies in what seems to me to be a good way.
File:
1 moved

Legend:

Unmodified
Added
Removed
  • trunk/ithildin/modules/ircd/chanmodes/regonly.c

    r804 r806  
    11/* 
    2  * cmodes_regonly.c: Registered nick channel restrictions 
     2 * regonly.c: Registered nick channel restrictions 
    33 *  
    4  * Copyright 2002 the Ithildin Project. 
     4 * Copyright 2002-2007 the Ithildin Project. 
    55 * See the COPYING file for more information on licensing and use. 
    66 *  
    77 * These two modes restrict non-registered users from joining in or speaking in 
    8  * a channel.  They work with the 'regnicks' addon. 
     8 * a channel.  They work with the 'regnicks' usermode. 
    99 */ 
    1010 
    11 #include <ithildin/stand.h> 
     11#include <ithildin/ithildin.h> 
    1212 
    1313#include "ircd.h" 
    14 #include "addons/core.h" 
    15 #include "addons/umode_reg.h" 
     14#include "usermodes/registered.h" 
    1615#include "commands/mode.h" 
    1716 
     
    1918 
    2019MODULE_REGISTER("$Rev$"); 
    21  
    22 const char **mdepends = [ 
    23     "ircd", 
    24     "ircd.addon.umode_reg", 
    25     NULL 
    26 ] 
     20const char *mdepends[] = MDEPENDS; 
    2721 
    2822static struct { 
     
    3428HOOK_FUNCTION(can_join_cmode_R); 
    3529 
    36 MODULE_LOADER(cmodes_regonly) { 
     30MODULE_LOADER(regonly) { 
    3731 
    3832    if (!get_module_savedata(savelist, "regonly_chanmodes", 
    3933                &regonly_chanmodes)) { 
    4034        chanmode_request('M', &regonly_chanmodes.M, CHANMODE_FL_D, 
    41                 "chanmode_flag", "chanmode_flag_query", 0, NULL); 
     35                chanmode_flag, chanmode_flag_query, 0, NULL); 
    4236        chanmode_request('R', &regonly_chanmodes.R, CHANMODE_FL_D, 
    43                 "chanmode_flag", "chanmode_flag_query", 0, NULL); 
     37                chanmode_flag, chanmode_flag_query, 0, NULL); 
     38    } else { 
     39        chanmode_update_funcs(regonly_chanmodes.M, chanmode_flag, 
     40                chanmode_flag_query); 
     41        chanmode_update_funcs(regonly_chanmodes.R, chanmode_flag, 
     42                chanmode_flag_query); 
    4443    } 
    4544    add_hook(ircd.events.can_send_channel, can_send_cmode_M); 
     
    5554} 
    5655 
    57 MODULE_UNLOADER(cmodes_regonly) { 
     56MODULE_UNLOADER(regonly) { 
    5857     
    5958    if (reload) 
Note: See TracChangeset for help on using the changeset viewer.