va_start(ap, msg); ret = irc_msg(target, MSG_CTCP, flags, msg, ap); va_end(ap);  return ret;
if(target == NULL) return -1; if(blankstr(msg)) return -1;  xstrcpy(str1, msg, MAX_MSGLEN); replace_alias(str1);  #ifndef _MSC_VER vsnprintf(str2, (MAX_MSGLEN-1), str1, ap); #else  _vsnprintf(str2, (MAX_MSGLEN-1), str1, ap); #endif  clearstr(str1, MAX_LEN);  if(flags & MSG_ALIAS) replace_alias(str2);  switch(msg_type) { case MSG_PRIVMSG: sprintf(str1, "PRIVMSG %s :%s", target, str2); break;  case MSG_ACTION: sprintf(str1, "PRIVMSG %s :%cACTION %s%c", target, C_EVENT, str2, C_EVENT); break;  case MSG_NOTICE: sprintf(str1, "NOTICE %s :%s", target, str2); break;  case MSG_CTCP: if(flags & MSG_CTCP_REPLY) sprintf(str1, "NOTICE %s :%c%s%c", target, C_EVENT, str2, C_EVENT); else sprintf(str1, "PRIVMSG %s :%c%s%c", target, C_EVENT, str2, C_EVENT); break;  default: sprintf(str1, "PRIVMSG %s :%s", target, str2); break; }  if(flags & MSG_URGENT) return irc_send(str1, 1); else return irc_raw(str1);
int irc_ctcp_chan(char *target, unsigned int flags, char *msg, ...) {	va_list ap;	int ret;        va_start(ap, msg);    ret = irc_msg(target, MSG_CTCP, flags, msg, ap);    va_end(ap);	return ret;}