/[svn]/ircd-hybrid-8/modules/m_services.c
ViewVC logotype

Diff of /ircd-hybrid-8/modules/m_services.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1181 by michael, Tue Aug 16 08:05:32 2011 UTC revision 1218 by michael, Fri Sep 16 08:42:03 2011 UTC
# Line 47  static void m_chanserv(struct Client *, Line 47  static void m_chanserv(struct Client *,
47  static void m_memoserv(struct Client *, struct Client *, int, char *[]);  static void m_memoserv(struct Client *, struct Client *, int, char *[]);
48  static void m_nickserv(struct Client *, struct Client *, int, char *[]);  static void m_nickserv(struct Client *, struct Client *, int, char *[]);
49  static void m_operserv(struct Client *, struct Client *, int, char *[]);  static void m_operserv(struct Client *, struct Client *, int, char *[]);
50    static void m_statserv(struct Client *, struct Client *, int, char *[]);
51    static void m_helpserv(struct Client *, struct Client *, int, char *[]);
52  static void m_identify(struct Client *, struct Client *, int, char *[]);  static void m_identify(struct Client *, struct Client *, int, char *[]);
53    
54  struct Message ms_msgtab = {  struct Message ms_msgtab = {
# Line 74  struct Message cs_msgtab = { Line 76  struct Message cs_msgtab = {
76    {m_unregistered, m_chanserv, m_ignore, m_ignore, m_chanserv, m_ignore}    {m_unregistered, m_chanserv, m_ignore, m_ignore, m_chanserv, m_ignore}
77  };  };
78    
79    struct Message ss_msgtab = {
80      "SS", 0, 0, 0, 1, MFLG_SLOW, 0,
81      {m_unregistered, m_statserv, m_ignore, m_ignore, m_statserv, m_ignore}
82    };
83    
84    struct Message hs_msgtab = {
85      "HS", 0, 0, 0, 1, MFLG_SLOW, 0,
86      {m_unregistered, m_helpserv, m_ignore, m_ignore, m_helpserv, m_ignore}
87    };
88    
89  struct Message botserv_msgtab = {  struct Message botserv_msgtab = {
90    "BOTSERV", 0, 0, 0, 1, MFLG_SLOW, 0,    "BOTSERV", 0, 0, 0, 1, MFLG_SLOW, 0,
91    {m_unregistered, m_botserv, m_ignore, m_ignore, m_botserv, m_ignore}    {m_unregistered, m_botserv, m_ignore, m_ignore, m_botserv, m_ignore}
# Line 99  struct Message operserv_msgtab = { Line 111  struct Message operserv_msgtab = {
111    {m_unregistered, m_operserv, m_ignore, m_ignore, m_operserv, m_ignore}    {m_unregistered, m_operserv, m_ignore, m_ignore, m_operserv, m_ignore}
112  };  };
113    
114    struct Message statserv_msgtab = {
115      "STATSERV", 0, 0, 0, 1, MFLG_SLOW, 0,
116      {m_unregistered, m_statserv, m_ignore, m_ignore, m_statserv, m_ignore}
117    };
118    
119    struct Message helpserv_msgtab = {
120      "HELPSERV", 0, 0, 0, 1, MFLG_SLOW, 0,
121      {m_unregistered, m_helpserv, m_ignore, m_ignore, m_helpserv, m_ignore}
122    };
123    
124  struct Message identify_msgtab = {  struct Message identify_msgtab = {
125    "IDENTIFY", 0, 0, 0, 1, MFLG_SLOW, 0,    "IDENTIFY", 0, 0, 0, 1, MFLG_SLOW, 0,
126    {m_unregistered, m_identify, m_ignore, m_ignore, m_identify, m_ignore}    {m_unregistered, m_identify, m_ignore, m_ignore, m_identify, m_ignore}
# Line 112  _modinit(void) Line 134  _modinit(void)
134    mod_add_cmd(&memoserv_msgtab);    mod_add_cmd(&memoserv_msgtab);
135    mod_add_cmd(&nickserv_msgtab);    mod_add_cmd(&nickserv_msgtab);
136    mod_add_cmd(&operserv_msgtab);    mod_add_cmd(&operserv_msgtab);
137      mod_add_cmd(&statserv_msgtab);
138      mod_add_cmd(&helpserv_msgtab);
139    mod_add_cmd(&identify_msgtab);    mod_add_cmd(&identify_msgtab);
140    mod_add_cmd(&bs_msgtab);    mod_add_cmd(&bs_msgtab);
141    mod_add_cmd(&ns_msgtab);    mod_add_cmd(&ns_msgtab);
142    mod_add_cmd(&cs_msgtab);    mod_add_cmd(&cs_msgtab);
143    mod_add_cmd(&ms_msgtab);    mod_add_cmd(&ms_msgtab);
144    mod_add_cmd(&os_msgtab);    mod_add_cmd(&os_msgtab);
145      mod_add_cmd(&ss_msgtab);
146      mod_add_cmd(&hs_msgtab);
147  }  }
148    
149  void  void
# Line 128  _moddeinit(void) Line 154  _moddeinit(void)
154    mod_del_cmd(&memoserv_msgtab);    mod_del_cmd(&memoserv_msgtab);
155    mod_del_cmd(&nickserv_msgtab);    mod_del_cmd(&nickserv_msgtab);
156    mod_del_cmd(&operserv_msgtab);    mod_del_cmd(&operserv_msgtab);
157      mod_del_cmd(&statserv_msgtab);
158      mod_del_cmd(&helpserv_msgtab);
159    mod_del_cmd(&identify_msgtab);    mod_del_cmd(&identify_msgtab);
160    mod_del_cmd(&bs_msgtab);    mod_del_cmd(&bs_msgtab);
161    mod_del_cmd(&ns_msgtab);    mod_del_cmd(&ns_msgtab);
162    mod_del_cmd(&cs_msgtab);    mod_del_cmd(&cs_msgtab);
163    mod_del_cmd(&ms_msgtab);    mod_del_cmd(&ms_msgtab);
164    mod_del_cmd(&os_msgtab);    mod_del_cmd(&os_msgtab);
165      mod_del_cmd(&ss_msgtab);
166      mod_del_cmd(&hs_msgtab);
167  }  }
168    
169  const char *_version = "$Revision$";  const char *_version = "$Revision$";
# Line 252  m_operserv(struct Client *client_p, stru Line 282  m_operserv(struct Client *client_p, stru
282  }  }
283    
284  static void  static void
285    m_statserv(struct Client *client_p, struct Client *source_p,
286               int parc, char *parv[])
287    {
288      struct Client *target_p = NULL;
289    
290      assert(client_p && source_p);
291      assert(client_p == source_p);
292    
293      if (EmptyString(parv[1]))
294      {
295        sendto_one(source_p, form_str(ERR_NOTEXTTOSEND),
296                   me.name, source_p->name);
297        return;
298      }
299    
300      if ((target_p = hash_find_server(ConfigFileEntry.service_name)))
301      {
302        sendto_one(target_p, ":%s PRIVMSG StatServ@%s :%s",
303                   source_p->name, ConfigFileEntry.service_name, parv[1]);
304        return;
305      }
306    
307      sendto_one(source_p, form_str(ERR_SERVICESDOWN),
308                 me.name, source_p->name, "StatServ");
309    }
310    
311    static void
312    m_helpserv(struct Client *client_p, struct Client *source_p,
313               int parc, char *parv[])
314    {
315      struct Client *target_p = NULL;
316    
317      assert(client_p && source_p);
318      assert(client_p == source_p);
319    
320      if (EmptyString(parv[1]))
321      {
322        sendto_one(source_p, form_str(ERR_NOTEXTTOSEND),
323                   me.name, source_p->name);
324        return;
325      }
326    
327      if ((target_p = hash_find_server(ConfigFileEntry.service_name)))
328      {
329        sendto_one(target_p, ":%s PRIVMSG HelpServ@%s :%s",
330                   source_p->name, ConfigFileEntry.service_name, parv[1]);
331        return;
332      }
333    
334      sendto_one(source_p, form_str(ERR_SERVICESDOWN),
335                 me.name, source_p->name, "HelpServ");
336    }
337    
338    static void
339  m_botserv(struct Client *client_p, struct Client *source_p,  m_botserv(struct Client *client_p, struct Client *source_p,
340            int parc, char *parv[])            int parc, char *parv[])
341  {  {

Legend:
Removed from v.1181  
changed lines
  Added in v.1218

svnadmin@ircd-hybrid.org
ViewVC Help
Powered by ViewVC 1.1.28