new function get_client_name_and_opername() add in s_misc.c
mirrored after get_client_name() which can return either nick/server or nick[ident@ip]
-diff -r a1e13a4f150b include/client.h
---- a/include/client.h Wed Mar 17 14:52:11 2010 +0100
-+++ b/include/client.h Wed Mar 17 15:44:04 2010 +0100
+diff -r 7f6ed442e24f include/client.h
+--- a/include/client.h Tue Mar 23 23:58:24 2010 +0100
++++ b/include/client.h Wed Mar 24 00:18:22 2010 +0100
@@ -810,6 +810,7 @@
#define IPV6USERBITS 64
extern const char* client_get_default_umode(const struct Client* sptr);
extern int client_get_ping(const struct Client* local_client);
extern void client_drop_sendq(struct Connection* con);
-diff -r a1e13a4f150b ircd/channel.c
---- a/ircd/channel.c Wed Mar 17 14:52:11 2010 +0100
-+++ b/ircd/channel.c Wed Mar 17 15:44:04 2010 +0100
-@@ -1848,8 +1848,8 @@
+diff -r 7f6ed442e24f ircd/channel.c
+--- a/ircd/channel.c Tue Mar 23 23:58:24 2010 +0100
++++ b/ircd/channel.c Wed Mar 24 00:18:22 2010 +0100
+@@ -1905,8 +1905,8 @@
if (mbuf->mb_dest & MODEBUF_DEST_HACK4)
sendto_opmask_butone(0, SNO_HACK4, "HACK(4): %s MODE %s %s%s%s%s%s%s "
"[%Tu]",
mbuf->mb_channel->chname,
rembuf_i ? "-" : "", rembuf, addbuf_i ? "+" : "",
addbuf, remstr, addstr,
-diff -r a1e13a4f150b ircd/gline.c
---- a/ircd/gline.c Wed Mar 17 14:52:11 2010 +0100
-+++ b/ircd/gline.c Wed Mar 17 15:44:04 2010 +0100
-@@ -563,7 +563,7 @@
+diff -r 7f6ed442e24f ircd/gline.c
+--- a/ircd/gline.c Tue Mar 23 23:58:24 2010 +0100
++++ b/ircd/gline.c Wed Mar 24 00:18:22 2010 +0100
+@@ -567,7 +567,7 @@
SNO_AUTO, "%s adding %s%s %s for %s%s%s%s%s, expiring at "
"%Tu: %s",
(feature_bool(FEAT_HIS_SNOTICES) || IsServer(sptr)) ?
cli_name((cli_user(sptr))->server),
(flags & GLINE_ACTIVE) ? "" : "deactivated ",
(flags & GLINE_LOCAL) ? "local" : "global",
-@@ -638,7 +638,7 @@
+@@ -642,7 +642,7 @@
sendto_opmask_butone(0, SNO_GLINE, "%s activating global %s for %s%s%s%s%s, "
"expiring at %Tu: %s",
(feature_bool(FEAT_HIS_SNOTICES) || IsServer(sptr)) ?
cli_name((cli_user(sptr))->server),
GlineIsBadChan(gline) ? "BADCHAN" : "GLINE",
GlineIsBadChan(gline)|GlineIsRealName(gline) ? "" : gline->gl_nick,
-@@ -711,7 +711,7 @@
+@@ -715,7 +715,7 @@
sendto_opmask_butone(0, SNO_GLINE, "%s %s %s for %s%s%s%s%s, expiring at %Tu: "
"%s",
(feature_bool(FEAT_HIS_SNOTICES) || IsServer(sptr)) ?
cli_name((cli_user(sptr))->server),
msg, GlineIsBadChan(gline) ? "BADCHAN" : "GLINE",
GlineIsBadChan(gline)|GlineIsRealName(gline) ? "" : gline->gl_nick,
-@@ -915,7 +915,7 @@
+@@ -919,7 +919,7 @@
/* All right, inform ops... */
sendto_opmask_butone(0, SNO_GLINE, "%s modifying global %s for %s%s%s%s%s:%s",
(feature_bool(FEAT_HIS_SNOTICES) || IsServer(sptr)) ?
GlineIsBadChan(gline) ? "BADCHAN" : "GLINE",
GlineIsBadChan(gline)|GlineIsRealName(gline) ? "" : gline->gl_nick,
GlineIsBadChan(gline)|GlineIsRealName(gline) ? "" : "!",
-@@ -962,7 +962,7 @@
+@@ -966,7 +966,7 @@
/* Inform ops and log it */
sendto_opmask_butone(0, SNO_GLINE, "%s removing local %s for %s%s%s%s%s",
(feature_bool(FEAT_HIS_SNOTICES) || IsServer(sptr)) ?
GlineIsBadChan(gline) ? "BADCHAN" : "GLINE",
GlineIsBadChan(gline)|GlineIsRealName(gline) ? "" : gline->gl_nick,
GlineIsBadChan(gline)|GlineIsRealName(gline) ? "" : "!",
-diff -r a1e13a4f150b ircd/jupe.c
---- a/ircd/jupe.c Wed Mar 17 14:52:11 2010 +0100
-+++ b/ircd/jupe.c Wed Mar 17 15:44:04 2010 +0100
+diff -r 7f6ed442e24f ircd/jupe.c
+--- a/ircd/jupe.c Tue Mar 23 23:58:24 2010 +0100
++++ b/ircd/jupe.c Wed Mar 24 00:18:22 2010 +0100
@@ -156,7 +156,7 @@
sendto_opmask_butone(0, SNO_NETWORK, "%s adding %sJUPE for %s, expiring at "
"%Tu: %s",
cli_name((cli_user(sptr))->server),
JupeIsLocal(jupe) ? "removing local" : "deactivating",
jupe->ju_server, jupe->ju_expire + TSoffset,
-diff -r a1e13a4f150b ircd/m_connect.c
---- a/ircd/m_connect.c Wed Mar 17 14:52:11 2010 +0100
-+++ b/ircd/m_connect.c Wed Mar 17 15:44:04 2010 +0100
+diff -r 7f6ed442e24f ircd/m_connect.c
+--- a/ircd/m_connect.c Tue Mar 23 23:58:24 2010 +0100
++++ b/ircd/m_connect.c Wed Mar 24 00:18:22 2010 +0100
@@ -197,7 +197,7 @@
sendwallto_group_butone(&me, WALL_WALLOPS, 0,
"Remote CONNECT %s %s from %s", aconf->name,
log_write(LS_NETWORK, L_INFO, 0, "CONNECT From %C : %s %s", sptr, aconf->name,
parv[2] ? parv[2] : "");
-diff -r a1e13a4f150b ircd/m_join.c
---- a/ircd/m_join.c Wed Mar 17 14:52:11 2010 +0100
-+++ b/ircd/m_join.c Wed Mar 17 15:44:04 2010 +0100
+diff -r 7f6ed442e24f ircd/m_join.c
+--- a/ircd/m_join.c Tue Mar 23 23:58:24 2010 +0100
++++ b/ircd/m_join.c Wed Mar 24 00:18:22 2010 +0100
@@ -242,8 +242,8 @@
}
/* send accountability notice */
err = 0;
}
-diff -r a1e13a4f150b ircd/m_kill.c
---- a/ircd/m_kill.c Wed Mar 17 14:52:11 2010 +0100
-+++ b/ircd/m_kill.c Wed Mar 17 15:44:04 2010 +0100
+diff -r 7f6ed442e24f ircd/m_jupe.c
+--- a/ircd/m_jupe.c Tue Mar 23 23:58:24 2010 +0100
++++ b/ircd/m_jupe.c Wed Mar 24 00:18:22 2010 +0100
+@@ -193,7 +193,7 @@
+ struct Jupe *ajupe;
+ unsigned int flags = 0;
+ time_t expire_off;
+- char *server = parv[1], *target = 0, *reason;
++ char *server = parv[1], *target = 0, reason[BUFSIZE];
+
+ if (parc < 2) {
+ if (!HasPriv(sptr, PRIV_ROUTEINFO))
+@@ -214,12 +214,12 @@
+
+ if (parc == 4) {
+ expire_off = atoi(parv[2]);
+- reason = parv[3];
++ ircd_snprintf(0, reason, sizeof(reason), "%s: %s", cli_user(sptr)->opername, parv[3]);
+ flags |= JUPE_LOCAL;
+ } else if (parc > 4) {
+ target = parv[2];
+ expire_off = atoi(parv[3]);
+- reason = parv[4];
++ ircd_snprintf(0, reason, sizeof(reason), "%s: %s", cli_user(sptr)->opername, parv[4]);
+ } else
+ return need_more_params(sptr, "JUPE");
+
+diff -r 7f6ed442e24f ircd/m_kill.c
+--- a/ircd/m_kill.c Tue Mar 23 23:58:24 2010 +0100
++++ b/ircd/m_kill.c Wed Mar 24 00:18:22 2010 +0100
@@ -127,7 +127,7 @@
*/
sendto_opmask_butone(0, snomask,
inpath, path, msg);
log_write_kill(victim, sptr, inpath, path, msg);
-diff -r a1e13a4f150b ircd/m_oper.c
---- a/ircd/m_oper.c Wed Mar 17 14:52:11 2010 +0100
-+++ b/ircd/m_oper.c Wed Mar 17 15:44:04 2010 +0100
+diff -r 7f6ed442e24f ircd/m_oper.c
+--- a/ircd/m_oper.c Tue Mar 23 23:58:24 2010 +0100
++++ b/ircd/m_oper.c Wed Mar 24 00:18:22 2010 +0100
@@ -192,9 +192,9 @@
send_umode_out(cptr, sptr, &old_mode, HasPriv(sptr, PRIV_PROPAGATE));
send_reply(sptr, RPL_YOUREOPER);
log_write(LS_OPER, L_INFO, 0, "OPER (%s) by (%#R)", name, sptr);
}
-diff -r a1e13a4f150b ircd/m_rehash.c
---- a/ircd/m_rehash.c Wed Mar 17 14:52:11 2010 +0100
-+++ b/ircd/m_rehash.c Wed Mar 17 15:44:04 2010 +0100
+diff -r 7f6ed442e24f ircd/m_rehash.c
+--- a/ircd/m_rehash.c Tue Mar 23 23:58:24 2010 +0100
++++ b/ircd/m_rehash.c Wed Mar 24 00:18:22 2010 +0100
@@ -121,8 +121,8 @@
}
log_write(LS_SYSTEM, L_INFO, 0, "REHASH From %#C", sptr);
-diff -r a1e13a4f150b ircd/m_settime.c
---- a/ircd/m_settime.c Wed Mar 17 14:52:11 2010 +0100
-+++ b/ircd/m_settime.c Wed Mar 17 15:44:04 2010 +0100
+diff -r 7f6ed442e24f ircd/m_settime.c
+--- a/ircd/m_settime.c Tue Mar 23 23:58:24 2010 +0100
++++ b/ircd/m_settime.c Wed Mar 24 00:18:22 2010 +0100
@@ -177,7 +177,7 @@
else /* tell opers about time change */
{
(dt < 0) ? "forwards" : "backwards");
TSoffset -= dt; /* apply time change */
if (IsUser(sptr)) /* let user know what we did */
-diff -r a1e13a4f150b ircd/s_misc.c
---- a/ircd/s_misc.c Wed Mar 17 14:52:11 2010 +0100
-+++ b/ircd/s_misc.c Wed Mar 17 15:44:04 2010 +0100
+diff -r 7f6ed442e24f ircd/s_misc.c
+--- a/ircd/s_misc.c Tue Mar 23 23:58:24 2010 +0100
++++ b/ircd/s_misc.c Wed Mar 24 00:18:22 2010 +0100
@@ -172,6 +172,20 @@
return nbuf;
}
cli_name(cli_user(killer)->server));
else if (killer != &me && cli_serv(victim)->up != killer)
sendto_opmask_butone(0, SNO_OLDSNO, "Received SQUIT %s from %s :",
-diff -r a1e13a4f150b ircd/s_user.c
---- a/ircd/s_user.c Wed Mar 17 14:52:11 2010 +0100
-+++ b/ircd/s_user.c Wed Mar 17 15:44:04 2010 +0100
-@@ -1342,9 +1342,8 @@
+diff -r 7f6ed442e24f ircd/s_user.c
+--- a/ircd/s_user.c Tue Mar 23 23:58:24 2010 +0100
++++ b/ircd/s_user.c Wed Mar 24 00:18:22 2010 +0100
+@@ -1324,9 +1324,8 @@
cli_handler(sptr) = CLIENT_HANDLER;
/* notify my operators a local operator has deOPERed - wiebe */
}
}
-@@ -1546,9 +1545,9 @@
+@@ -1528,9 +1527,9 @@
/* notify my operators a user has OPERed on a remote server - wiebe */
if (!MyConnect(sptr)) {
}
}
-@@ -1563,13 +1562,12 @@
+@@ -1545,13 +1544,12 @@
/* notify my operators an operator has deOPERed on the network - wiebe */
if (MyConnect(sptr)) {