+void
+global_message_args(long targets, const char *language_entry, ...)
+{
+ struct globalMessage *message;
+ va_list arg_list;
+ dict_iterator_t it;
+ char response[MAXLEN];
+ const char *fmt;
+
+ if(!targets || !global)
+ return;
+
+ fmt = strdup(language_entry);
+
+ /* Notice users/opers/helpers */
+ for (it = dict_first(clients); it; it = iter_next(it)) {
+ struct userNode *luser = iter_data(it);
+
+ language_entry = user_find_message(luser, fmt);
+
+ va_start(arg_list, language_entry);
+ vsnprintf(response, MAXLEN-2, language_entry, arg_list);
+ response[MAXLEN-1] = 0;
+
+ message = message_add(targets | MESSAGE_OPTION_SOURCELESS, now, 0, "", response);
+ if (!message)
+ continue;
+
+ /* opers */
+ if(message->flags & MESSAGE_RECIPIENT_OPERS && IsOper(luser)) {
+ if(luser->uplink != self)
+ notice_target(luser->nick, message);
+
+ if ((message->flags & MESSAGE_RECIPIENT_LUSERS) || (message->flags & MESSAGE_RECIPIENT_HELPERS))
+ continue;
+ }
+
+ /* helpers */
+ if (message->flags & MESSAGE_RECIPIENT_HELPERS && IsHelper(luser)) {
+ notice_target(luser->nick, message);
+
+ if (message->flags & MESSAGE_RECIPIENT_LUSERS)
+ continue;
+ }
+
+ /* users */
+ if (message->flags & MESSAGE_RECIPIENT_LUSERS)
+ notice_target(luser->nick, message);
+ }
+
+ message_del(message);
+}
+