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

Comparing ircd-hybrid-8/src/send.c (file contents):
Revision 1156 by michael, Tue Aug 9 20:29:20 2011 UTC vs.
Revision 1206 by michael, Wed Aug 24 21:41:23 2011 UTC

# Line 1000 | Line 1000 | sendto_realops_flags(unsigned int flags,
1000    }
1001   }
1002  
1003 + void
1004 + sendto_globops_flags(unsigned int flags, int level, const char *pattern, ...)
1005 + {
1006 +  dlink_node *ptr = NULL;
1007 +  char nbuf[IRCD_BUFSIZE];
1008 +  va_list args;
1009 +
1010 +  va_start(args, pattern);
1011 +  vsnprintf(nbuf, IRCD_BUFSIZE, pattern, args);
1012 +  va_end(args);
1013 +
1014 +  DLINK_FOREACH(ptr, oper_list.head)
1015 +  {
1016 +    struct Client *client_p = ptr->data;
1017 +    assert(client_p->umodes & UMODE_OPER);
1018 +
1019 +    /* If we're sending it to opers and theyre an admin, skip.
1020 +     * If we're sending it to admins, and theyre not, skip.
1021 +     */
1022 +    if (((level == L_ADMIN) && !IsAdmin(client_p)) ||
1023 +        ((level == L_OPER) && IsAdmin(client_p)))
1024 +      continue;
1025 +
1026 +    if (client_p->umodes & flags)
1027 +      sendto_one(client_p, ":%s NOTICE %s :*** Global -- %s",
1028 +                 me.name, client_p->name, nbuf);
1029 +  }
1030 + }
1031 +
1032   /* sendto_wallops_flags()
1033   *
1034   * inputs       - flag types of messages to show to real opers

Diff Legend

Removed lines
+ Added lines
< Changed lines (old)
> Changed lines (new)