/[svn]/ircd-hybrid/trunk/modules/m_unresv.c
ViewVC logotype

Diff of /ircd-hybrid/trunk/modules/m_unresv.c

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

revision 4649 by michael, Sun Aug 24 10:27:40 2014 UTC revision 4650 by michael, Sun Sep 21 18:48:07 2014 UTC
# Line 48  remove_resv(struct Client *source_p, con Line 48  remove_resv(struct Client *source_p, con
48    {    {
49      if ((conf = find_exact_name_conf(CONF_CRESV, NULL, name, NULL, NULL)) == NULL)      if ((conf = find_exact_name_conf(CONF_CRESV, NULL, name, NULL, NULL)) == NULL)
50      {      {
51        sendto_one_notice(source_p, &me, ":A RESV does not exist for channel: %s", name);        if (IsClient(source_p))
52           sendto_one_notice(source_p, &me, ":A RESV does not exist for channel: %s", name);
53        return;        return;
54      }      }
55    
56      if (!IsConfDatabase(conf))      if (!IsConfDatabase(conf))
57      {      {
58        sendto_one_notice(source_p, &me, ":The RESV for channel: %s is in ircd.conf and must be removed by hand.",        if (IsClient(source_p))
59                          name);          sendto_one_notice(source_p, &me, ":The RESV for channel: %s is in ircd.conf and must be removed by hand.",
60                              name);
61        return;        return;
62      }      }
63    
64      conf_free(conf);      conf_free(conf);
65      sendto_one_notice(source_p, &me, ":The RESV has been removed on channel: %s", name);  
66        if (IsClient(source_p))
67          sendto_one_notice(source_p, &me, ":The RESV has been removed on channel: %s", name);
68      sendto_realops_flags(UMODE_ALL, L_ALL, SEND_NOTICE,      sendto_realops_flags(UMODE_ALL, L_ALL, SEND_NOTICE,
69                           "%s has removed the RESV for channel: %s",                           "%s has removed the RESV for channel: %s",
70                           get_oper_name(source_p), name);                           get_oper_name(source_p), name);
# Line 71  remove_resv(struct Client *source_p, con Line 75  remove_resv(struct Client *source_p, con
75    {    {
76      if ((conf = find_exact_name_conf(CONF_NRESV, NULL, name, NULL, NULL)) == NULL)      if ((conf = find_exact_name_conf(CONF_NRESV, NULL, name, NULL, NULL)) == NULL)
77      {      {
78        sendto_one_notice(source_p, &me, ":A RESV does not exist for nick: %s", name);        if (IsClient(source_p))
79            sendto_one_notice(source_p, &me, ":A RESV does not exist for nick: %s", name);
80        return;        return;
81      }      }
82    
83      if (!IsConfDatabase(conf))      if (!IsConfDatabase(conf))
84      {      {
85        sendto_one_notice(source_p, &me, ":The RESV for nick: %s is in ircd.conf and must be removed by hand.",        if (IsClient(source_p))
86                          name);          sendto_one_notice(source_p, &me, ":The RESV for nick: %s is in ircd.conf and must be removed by hand.",
87                              name);
88        return;        return;
89      }      }
90    
91      conf_free(conf);      conf_free(conf);
92      sendto_one_notice(source_p, &me, ":The RESV has been removed on nick: %s", name);  
93        if (IsClient(source_p))
94          sendto_one_notice(source_p, &me, ":The RESV has been removed on nick: %s", name);
95      sendto_realops_flags(UMODE_ALL, L_ALL, SEND_NOTICE,      sendto_realops_flags(UMODE_ALL, L_ALL, SEND_NOTICE,
96                           "%s has removed the RESV for nick: %s",                           "%s has removed the RESV for nick: %s",
97                           get_oper_name(source_p), name);                           get_oper_name(source_p), name);
# Line 120  mo_unresv(struct Client *source_p, int p Line 128  mo_unresv(struct Client *source_p, int p
128    
129    if (target_server)    if (target_server)
130    {    {
131      sendto_match_servs(source_p, target_server, CAP_CLUSTER,      sendto_match_servs(source_p, target_server, CAP_CLUSTER, "UNRESV %s %s",
                        "UNRESV %s %s",  
132                         target_server, resv);                         target_server, resv);
133    
134      /* Allow ON to apply local unresv as well if it matches */      /* Allow ON to apply local unresv as well if it matches */
# Line 153  ms_unresv(struct Client *source_p, int p Line 160  ms_unresv(struct Client *source_p, int p
160    if (parc != 3 || EmptyString(parv[2]))    if (parc != 3 || EmptyString(parv[2]))
161      return 0;      return 0;
162    
163    sendto_match_servs(source_p, parv[1], CAP_CLUSTER,    sendto_match_servs(source_p, parv[1], CAP_CLUSTER, "UNRESV %s %s",
                      "UNRESV %s %s",  
164                       parv[1], parv[2]);                       parv[1], parv[2]);
165    
166    if (!IsClient(source_p) || match(parv[1], me.name))    if (match(parv[1], me.name))
167      return 0;      return 0;
168    
169    if (HasFlag(source_p, FLAGS_SERVICE) ||    if (HasFlag(source_p, FLAGS_SERVICE) ||

Legend:
Removed from v.4649  
changed lines
  Added in v.4650

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