ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/svn/ircd-hybrid/trunk/modules/core/m_message.c
(Generate patch)

Comparing ircd-hybrid/trunk/modules/core/m_message.c (file contents):
Revision 1833 by michael, Fri Apr 19 19:16:09 2013 UTC vs.
Revision 1834 by michael, Fri Apr 19 19:50:27 2013 UTC

# Line 146 | Line 146 | m_message(int p_or_n, const char *comman
146    if (parc < 2 || EmptyString(parv[1]))
147    {
148      if (p_or_n != NOTICE)
149 <      sendto_one(source_p, ERR_NORECIPIENT,
149 >      sendto_one(source_p, form_str(ERR_NORECIPIENT),
150                   ID_or_name(&me, client_p),
151                   ID_or_name(source_p, client_p), command);
152      return;
# Line 155 | Line 155 | m_message(int p_or_n, const char *comman
155    if (parc < 3 || EmptyString(parv[2]))
156    {
157      if (p_or_n != NOTICE)
158 <      sendto_one(source_p, ERR_NOTEXTTOSEND,
158 >      sendto_one(source_p, form_str(ERR_NOTEXTTOSEND),
159                   ID_or_name(&me, client_p),
160                   ID_or_name(source_p, client_p));
161      return;
# Line 238 | Line 238 | build_target_list(int p_or_n, const char
238          {
239            if (ntargets >= ConfigFileEntry.max_targets)
240            {
241 <            sendto_one(source_p, ERR_TOOMANYTARGETS,
241 >            sendto_one(source_p, form_str(ERR_TOOMANYTARGETS),
242                         ID_or_name(&me, client_p),
243                         ID_or_name(source_p, client_p), nick,
244                         ConfigFileEntry.max_targets);
# Line 251 | Line 251 | build_target_list(int p_or_n, const char
251        else
252        {
253          if (p_or_n != NOTICE)
254 <          sendto_one(source_p, ERR_NOSUCHNICK,
254 >          sendto_one(source_p, form_str(ERR_NOSUCHNICK),
255                       ID_or_name(&me, client_p),
256                       ID_or_name(source_p, client_p), nick);
257        }
# Line 265 | Line 265 | build_target_list(int p_or_n, const char
265        {
266          if (ntargets >= ConfigFileEntry.max_targets)
267            {
268 <            sendto_one(source_p, ERR_TOOMANYTARGETS,
268 >            sendto_one(source_p, form_str(ERR_TOOMANYTARGETS),
269                         ID_or_name(&me, client_p),
270                         ID_or_name(source_p, client_p), nick,
271                         ConfigFileEntry.max_targets);
# Line 303 | Line 303 | build_target_list(int p_or_n, const char
303        /* suggested by Mortiis */
304        if (*nick == '\0')      /* if its a '\0' dump it, there is no recipient */
305        {
306 <        sendto_one(source_p, ERR_NORECIPIENT,
306 >        sendto_one(source_p, form_str(ERR_NORECIPIENT),
307                     ID_or_name(&me, client_p),
308                     ID_or_name(source_p, client_p), command);
309          continue;
# Line 320 | Line 320 | build_target_list(int p_or_n, const char
320            if (!has_member_flags(find_channel_link(source_p, chptr),
321                                  CHFL_CHANOP|CHFL_HALFOP|CHFL_VOICE))
322            {
323 <            sendto_one(source_p, ERR_CHANOPRIVSNEEDED,
323 >            sendto_one(source_p, form_str(ERR_CHANOPRIVSNEEDED),
324                         ID_or_name(&me, client_p),
325                         ID_or_name(source_p, client_p), with_prefix);
326              return(-1);
# Line 331 | Line 331 | build_target_list(int p_or_n, const char
331          {
332            if (ntargets >= ConfigFileEntry.max_targets)
333            {
334 <            sendto_one(source_p, ERR_TOOMANYTARGETS,
334 >            sendto_one(source_p, form_str(ERR_TOOMANYTARGETS),
335                         ID_or_name(&me, client_p),
336                         ID_or_name(source_p, client_p), nick,
337                         ConfigFileEntry.max_targets);
# Line 345 | Line 345 | build_target_list(int p_or_n, const char
345        else
346        {
347          if (p_or_n != NOTICE)
348 <          sendto_one(source_p, ERR_NOSUCHNICK,
348 >          sendto_one(source_p, form_str(ERR_NOSUCHNICK),
349                       ID_or_name(&me, client_p),
350                       ID_or_name(source_p, client_p), nick);
351        }
# Line 361 | Line 361 | build_target_list(int p_or_n, const char
361        if (p_or_n != NOTICE)
362        {
363          if (!IsDigit(*nick) || MyClient(source_p))
364 <          sendto_one(source_p, ERR_NOSUCHNICK,
364 >          sendto_one(source_p, form_str(ERR_NOSUCHNICK),
365                       ID_or_name(&me, client_p),
366                       ID_or_name(source_p, client_p), nick);
367        }
# Line 429 | Line 429 | msg_channel(int p_or_n, const char *comm
429    else
430    {
431      if (p_or_n != NOTICE)
432 <      sendto_one(source_p, ERR_CANNOTSENDTOCHAN,
432 >      sendto_one(source_p, form_str(ERR_CANNOTSENDTOCHAN),
433                   ID_or_name(&me, client_p),
434                   ID_or_name(source_p, client_p), chptr->chname);
435    }
# Line 505 | Line 505 | msg_client(int p_or_n, const char *comma
505        source_p->localClient->last_privmsg = CurrentTime;
506  
507      if ((p_or_n != NOTICE) && target_p->away[0])
508 <      sendto_one(source_p, RPL_AWAY, me.name,
508 >      sendto_one(source_p, form_str(RPL_AWAY), me.name,
509                   source_p->name, target_p->name, target_p->away);
510  
511      if (HasUMode(target_p, UMODE_REGONLY) && target_p != source_p)
# Line 513 | Line 513 | msg_client(int p_or_n, const char *comma
513        if (!HasUMode(source_p, UMODE_REGISTERED|UMODE_OPER))
514        {
515          if (p_or_n != NOTICE)
516 <          sendto_one(source_p, ERR_NONONREG, me.name, source_p->name,
516 >          sendto_one(source_p, form_str(ERR_NONONREG), me.name, source_p->name,
517                       target_p->name);
518          return;
519        }
# Line 536 | Line 536 | msg_client(int p_or_n, const char *comma
536        {
537          /* check for accept, flag recipient incoming message */
538          if (p_or_n != NOTICE)
539 <          sendto_one(source_p, RPL_TARGUMODEG,
539 >          sendto_one(source_p, form_str(RPL_TARGUMODEG),
540                       ID_or_name(&me, source_p->from),
541                       ID_or_name(source_p, source_p->from), target_p->name);
542  
# Line 544 | Line 544 | msg_client(int p_or_n, const char *comma
544               ConfigFileEntry.caller_id_wait) < CurrentTime)
545          {
546            if (p_or_n != NOTICE)
547 <            sendto_one(source_p, RPL_TARGNOTIFY,
547 >            sendto_one(source_p, form_str(RPL_TARGNOTIFY),
548                         ID_or_name(&me, source_p->from),
549                         ID_or_name(source_p, source_p->from), target_p->name);
550  
551 <          sendto_one(target_p, RPL_UMODEGMSG,
551 >          sendto_one(target_p, form_str(RPL_UMODEGMSG),
552                       me.name, target_p->name,
553                       get_client_name(source_p, HIDE_IP));
554  
# Line 738 | Line 738 | handle_special(int p_or_n, const char *c
738  
739      if ((host = strchr(nick, '%')) && !HasUMode(source_p, UMODE_OPER))
740      {
741 <      sendto_one(source_p, ERR_NOPRIVILEGES,
741 >      sendto_one(source_p, form_str(ERR_NOPRIVILEGES),
742                   ID_or_name(&me, client_p),
743                   ID_or_name(source_p, client_p));
744        return;
# Line 787 | Line 787 | handle_special(int p_or_n, const char *c
787              source_p->localClient->last_privmsg = CurrentTime;
788          }
789          else
790 <          sendto_one(source_p, ERR_TOOMANYTARGETS,
790 >          sendto_one(source_p, form_str(ERR_TOOMANYTARGETS),
791                       ID_or_name(&me, client_p),
792                       ID_or_name(source_p, client_p), nick,
793                       ConfigFileEntry.max_targets);
794        }
795      }
796      else if (server && *(server+1) && (target_p == NULL))
797 <        sendto_one(source_p, ERR_NOSUCHSERVER,
797 >        sendto_one(source_p, form_str(ERR_NOSUCHSERVER),
798                     ID_or_name(&me, client_p),
799                     ID_or_name(source_p, client_p), server+1);
800      else if (server && (target_p == NULL))
801 <        sendto_one(source_p, ERR_NOSUCHNICK,
801 >        sendto_one(source_p, form_str(ERR_NOSUCHNICK),
802                     ID_or_name(&me, client_p),
803                     ID_or_name(source_p, client_p), nick);
804      return;
# Line 806 | Line 806 | handle_special(int p_or_n, const char *c
806  
807    if (!HasUMode(source_p, UMODE_OPER))
808    {
809 <    sendto_one(source_p, ERR_NOPRIVILEGES,
809 >    sendto_one(source_p, form_str(ERR_NOPRIVILEGES),
810                 ID_or_name(&me, client_p),
811                 ID_or_name(source_p, client_p));
812      return;
# Line 832 | Line 832 | handle_special(int p_or_n, const char *c
832  
833      if ((s = strrchr(nick, '.')) == NULL)
834      {
835 <      sendto_one(source_p, ERR_NOTOPLEVEL,
835 >      sendto_one(source_p, form_str(ERR_NOTOPLEVEL),
836                   me.name, source_p->name, nick);
837        return;
838      }
# Line 843 | Line 843 | handle_special(int p_or_n, const char *c
843  
844      if (*s == '*' || *s == '?')
845      {
846 <      sendto_one(source_p, ERR_WILDTOPLEVEL,
846 >      sendto_one(source_p, form_str(ERR_WILDTOPLEVEL),
847                   ID_or_name(&me, client_p),
848                   ID_or_name(source_p, client_p), nick);
849        return;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines