/* * mo_version - oper message handler * * parv[0] = sender prefix * parv[1] = servername */ int mo_version(struct Client* cptr, struct Client* sptr, int parc, char* parv[]) { struct Client *acptr; if (MyConnect(sptr) && parc > 1) { if (!(acptr = find_match_server(parv[1]))) { send_reply(sptr, ERR_NOSUCHSERVER, parv[1]); return 0; } parv[1] = cli_name(acptr); } if (hunt_server_cmd(sptr, CMD_VERSION, cptr, feature_int(FEAT_HIS_REMOTE), ":%C", 1, parc, parv) == HUNTED_ISME) { send_reply(sptr, RPL_VERSION, version, debugmode, cli_name(&me), debug_serveropts()); send_supported(sptr); } return 0; }
/* * m_version - generic message handler * * parv[0] = sender prefix * parv[1] = servername */ int m_version(struct Client* cptr, struct Client* sptr, int parc, char* parv[]) { if (parc > 1 && match(parv[1], cli_name(&me))) return send_reply(sptr, ERR_NOPRIVILEGES); send_reply(sptr, RPL_VERSION, version, debugmode, cli_name(&me), debug_serveropts()); send_supported(sptr); return 0; }
/* * mo_version - oper message handler * * parv[0] = sender prefix * parv[1] = servername */ int mo_version(struct Client* cptr, struct Client* sptr, int parc, char* parv[]) { struct Client *acptr; if (MyConnect(sptr) && parc > 1) { if (!(acptr = find_match_server(parv[1]))) { send_reply(sptr, ERR_NOSUCHSERVER, parv[1]); return 0; } parv[1] = cli_name(acptr); } if (hunt_server_cmd(sptr, CMD_VERSION, cptr, feature_int(FEAT_HIS_REMOTE), ":%C", 1, parc, parv) == HUNTED_ISME) { send_reply(sptr, RPL_VERSION, version, cvs_version, debugmode, cli_name(&me), debug_serveropts()); #ifdef USE_SSL #ifdef DEBUGMODE sendcmdto_one(&me, CMD_NOTICE, sptr, "%C :Headers: %s", sptr, OPENSSL_VERSION_TEXT); #endif sendcmdto_one(&me, CMD_NOTICE, sptr, "%C :Library: %s", sptr, SSLeay_version(SSLEAY_VERSION)); #endif #ifdef USE_GEOIP sendcmdto_one(&me, CMD_NOTICE, sptr, "%C :GeoIP %s", sptr, geoip_version()); #endif #ifdef USE_MMDB sendcmdto_one(&me, CMD_NOTICE, sptr, "%C :MaxMindDB %s", sptr, geoip_libmmdb_version()); #endif send_supported(sptr); } return 0; }