X-Git-Url: http://git.pk910.de/?a=blobdiff_plain;f=ircd%2Fm_admin.c;h=a6bbcce070d32bf5ee137997a448f37d908cbb71;hb=241fa041ccfa00c2f9f255c4c2a572d877b975e3;hp=839d7148846249972cf44916e401e9eea62c0c10;hpb=8af0b38d9397766bbed511f317832e5c5bf7e45d;p=ircu2.10.12-pk.git diff --git a/ircd/m_admin.c b/ircd/m_admin.c index 839d714..a6bbcce 100644 --- a/ircd/m_admin.c +++ b/ircd/m_admin.c @@ -97,6 +97,19 @@ #include +static int send_admin_info(struct Client* sptr) +{ + const struct LocalConf* admin = conf_get_local(); + assert(0 != sptr); + + send_reply(sptr, RPL_ADMINME, cli_name(&me)); + send_reply(sptr, RPL_ADMINLOC1, admin->location1); + send_reply(sptr, RPL_ADMINLOC2, admin->location2); + send_reply(sptr, RPL_ADMINEMAIL, admin->contact); + return 0; +} + + /* * m_admin - generic message handler * @@ -110,7 +123,10 @@ int m_admin(struct Client* cptr, struct Client* sptr, int parc, char* parv[]) if (parc > 1) { struct Client *acptr; - if (!(acptr = find_match_server(parv[1]))) + acptr = FindUser(parv[1]); + if (acptr) + parv[1] = cli_name(cli_user(acptr)->server); + else if (!(acptr = find_match_server(parv[1]))) return send_reply(sptr, ERR_NOSUCHSERVER, parv[1]); parv[1] = cli_name(acptr);