mirror of
https://github.com/unrealircd/unrealircd.git
synced 2026-07-07 19:23:12 +02:00
Try to use more me.id where possible (rather than me.name)
This commit is contained in:
@@ -289,7 +289,7 @@ static void unload_extcmode_commit(Cmode *cmode)
|
||||
me.name, channel->chname, cmode->flag);
|
||||
sendto_server(NULL, 0, 0, mtags,
|
||||
":%s MODE %s -%c 0",
|
||||
me.name, channel->chname, cmode->flag);
|
||||
me.id, channel->chname, cmode->flag);
|
||||
free_message_tags(mtags);
|
||||
|
||||
channel->mode.extmode &= ~cmode->mode;
|
||||
@@ -313,14 +313,14 @@ static void unload_extcmode_commit(Cmode *cmode)
|
||||
me.name, channel->chname, cmode->flag, param);
|
||||
sendto_server(NULL, 0, 0, mtags,
|
||||
":%s MODE %s -%c %s 0",
|
||||
me.name, channel->chname, cmode->flag, param);
|
||||
me.id, channel->chname, cmode->flag, param);
|
||||
} else {
|
||||
sendto_channel(channel, &me, NULL, 0, 0, SEND_LOCAL, mtags,
|
||||
":%s MODE %s -%c",
|
||||
me.name, channel->chname, cmode->flag);
|
||||
sendto_server(NULL, 0, 0, mtags,
|
||||
":%s MODE %s -%c 0",
|
||||
me.name, channel->chname, cmode->flag);
|
||||
me.id, channel->chname, cmode->flag);
|
||||
}
|
||||
free_message_tags(mtags);
|
||||
|
||||
|
||||
+1
-1
@@ -91,7 +91,7 @@ void dcc_sync(Client *client)
|
||||
for (p = conf_deny_dcc; p; p = p->next)
|
||||
{
|
||||
if (p->flag.type2 == CONF_BAN_TYPE_AKILL)
|
||||
sendto_one(client, NULL, ":%s SVSFLINE + %s :%s", me.name,
|
||||
sendto_one(client, NULL, ":%s SVSFLINE + %s :%s", me.id,
|
||||
p->filename, p->reason);
|
||||
}
|
||||
}
|
||||
|
||||
+1
-2
@@ -441,8 +441,7 @@ void check_ping(Client *client)
|
||||
get_client_name(client, FALSE));
|
||||
sendto_server(&me, 0, 0, NULL,
|
||||
":%s GLOBOPS :No response from %s, closing link",
|
||||
me.name, get_client_name(client,
|
||||
FALSE));
|
||||
me.id, get_client_name(client, FALSE));
|
||||
}
|
||||
if (IsTLSAcceptHandshake(client))
|
||||
Debug((DEBUG_DEBUG, "ssl accept handshake timeout: %s (%lld-%lld > %lld)", client->local->sockhost,
|
||||
|
||||
@@ -314,14 +314,14 @@ void send_first_auth(Client *client)
|
||||
}
|
||||
|
||||
sendto_one(sasl_server, NULL, ":%s SASL %s %s H %s %s",
|
||||
me.name, SASL_SERVER, client->id, addr, addr);
|
||||
me.id, SASL_SERVER, client->id, addr, addr);
|
||||
|
||||
if (certfp)
|
||||
sendto_one(sasl_server, NULL, ":%s SASL %s %s S %s %s",
|
||||
me.name, SASL_SERVER, client->id, "PLAIN", certfp);
|
||||
me.id, SASL_SERVER, client->id, "PLAIN", certfp);
|
||||
else
|
||||
sendto_one(sasl_server, NULL, ":%s SASL %s %s S %s",
|
||||
me.name, SASL_SERVER, client->id, "PLAIN");
|
||||
me.id, SASL_SERVER, client->id, "PLAIN");
|
||||
|
||||
/* The rest is sent from authprompt_sasl_continuation() */
|
||||
|
||||
@@ -477,7 +477,7 @@ int authprompt_sasl_continuation(Client *client, char *buf)
|
||||
if (agent)
|
||||
{
|
||||
sendto_one(agent, NULL, ":%s SASL %s %s C %s",
|
||||
me.name, AGENT_SID(agent), client->id, SEUSER(client)->authmsg);
|
||||
me.id, AGENT_SID(agent), client->id, SEUSER(client)->authmsg);
|
||||
}
|
||||
SEUSER(client)->authmsg = NULL;
|
||||
}
|
||||
|
||||
@@ -1048,7 +1048,7 @@ int floodprot_can_send_to_channel(Client *client, Channel *channel, Membership *
|
||||
mtags = NULL;
|
||||
new_message(&me, NULL, &mtags);
|
||||
sendto_server(&me, 0, 0, mtags, ":%s MODE %s +b %s 0",
|
||||
me.name, channel->chname, mask);
|
||||
me.id, channel->chname, mask);
|
||||
sendto_channel(channel, &me, NULL, 0, 0, SEND_LOCAL, mtags,
|
||||
":%s MODE %s +b %s", me.name, channel->chname, mask);
|
||||
free_message_tags(mtags);
|
||||
@@ -1060,7 +1060,7 @@ int floodprot_can_send_to_channel(Client *client, Channel *channel, Membership *
|
||||
":%s KICK %s %s :%s", me.name,
|
||||
channel->chname, client->name, errbuf);
|
||||
sendto_server(NULL, 0, 0, mtags, ":%s KICK %s %s :%s",
|
||||
me.name, channel->chname, client->id, errbuf);
|
||||
me.id, channel->chname, client->id, errbuf);
|
||||
free_message_tags(mtags);
|
||||
remove_user_from_channel(client, channel);
|
||||
*errmsg = errbuf; /* not used, but needs to be set */
|
||||
@@ -1281,7 +1281,7 @@ EVENT(modef_event)
|
||||
MessageTag *mtags = NULL;
|
||||
|
||||
new_message(&me, NULL, &mtags);
|
||||
sendto_server(&me, 0, 0, mtags, ":%s MODE %s -%c 0", me.name, e->channel->chname, e->m);
|
||||
sendto_server(&me, 0, 0, mtags, ":%s MODE %s -%c 0", me.id, e->channel->chname, e->m);
|
||||
sendto_channel(e->channel, &me, NULL, 0, 0, SEND_LOCAL, mtags,
|
||||
":%s MODE %s -%c",
|
||||
me.name, e->channel->chname, e->m);
|
||||
@@ -1392,7 +1392,7 @@ void do_floodprot_action(Channel *channel, int what, char *text)
|
||||
/* Then the MODE broadcast */
|
||||
mtags = NULL;
|
||||
new_message(&me, NULL, &mtags);
|
||||
sendto_server(&me, 0, 0, mtags, ":%s MODE %s +%c 0", me.name, channel->chname, m);
|
||||
sendto_server(&me, 0, 0, mtags, ":%s MODE %s +%c 0", me.id, channel->chname, m);
|
||||
sendto_channel(channel, &me, NULL, 0, 0, SEND_LOCAL, mtags, ":%s MODE %s +%c", me.name, channel->chname, m);
|
||||
free_message_tags(mtags);
|
||||
|
||||
|
||||
@@ -144,8 +144,9 @@ void issecure_unset(Channel *channel, Client *client, MessageTag *recv_mtags, in
|
||||
{
|
||||
mtags = NULL;
|
||||
new_message_special(&me, recv_mtags, &mtags, "NOTICE %s :setting -Z", channel->chname);
|
||||
sendto_channel(channel, &me, NULL, 0, 0, SEND_LOCAL, mtags, ":%s NOTICE %s :User '%s' joined and is not connected through SSL/TLS, setting channel -Z (insecure)",
|
||||
me.name, channel->chname, client->name);
|
||||
sendto_channel(channel, &me, NULL, 0, 0, SEND_LOCAL, mtags,
|
||||
":%s NOTICE %s :User '%s' joined and is not connected through SSL/TLS, setting channel -Z (insecure)",
|
||||
me.id, channel->chname, client->name);
|
||||
free_message_tags(mtags);
|
||||
}
|
||||
|
||||
|
||||
@@ -333,7 +333,9 @@ int link_doforward(Client *client, Channel *channel, char *linked, linkType type
|
||||
break;
|
||||
}
|
||||
|
||||
sendto_one(client, NULL, ":%s %d %s [Link] Cannot join channel %s (%s) -- transferring you to %s", me.name, ERR_LINKCHANNEL, client->name, channel->chname, desc, linked);
|
||||
sendto_one(client, NULL,
|
||||
":%s %d %s [Link] Cannot join channel %s (%s) -- transferring you to %s",
|
||||
me.name, ERR_LINKCHANNEL, client->name, channel->chname, desc, linked);
|
||||
parv[0] = client->name;
|
||||
parv[1] = linked;
|
||||
parv[2] = NULL;
|
||||
|
||||
@@ -118,7 +118,7 @@ static int secureonly_kick_insecure_users(Channel *channel)
|
||||
|
||||
sendto_prefix_one(client, &me, mtags, ":%s KICK %s %s :%s", me.name, channel->chname, client->name, comment);
|
||||
|
||||
sendto_server(&me, 0, 0, mtags, ":%s KICK %s %s :%s", me.name, channel->chname, client->id, comment);
|
||||
sendto_server(&me, 0, 0, mtags, ":%s KICK %s %s :%s", me.id, channel->chname, client->id, comment);
|
||||
|
||||
free_message_tags(mtags);
|
||||
|
||||
|
||||
@@ -131,7 +131,7 @@ CMD_FUNC(cmd_connect)
|
||||
{
|
||||
sendto_server(&me, 0, 0, NULL,
|
||||
":%s GLOBOPS :Remote CONNECT %s %s from %s",
|
||||
me.name, parv[1], parv[2] ? parv[2] : "",
|
||||
me.id, parv[1], parv[2] ? parv[2] : "",
|
||||
get_client_name(client, FALSE));
|
||||
}
|
||||
|
||||
|
||||
@@ -434,7 +434,7 @@ EVENT(timedban_timeout)
|
||||
MessageTag *mtags = NULL;
|
||||
new_message(&me, NULL, &mtags);
|
||||
sendto_channel(channel, &me, NULL, 0, 0, SEND_LOCAL, mtags, ":%s MODE %s %s %s", me.name, channel->chname, mbuf, pbuf);
|
||||
sendto_server(NULL, 0, 0, mtags, ":%s MODE %s %s %s 0", me.name, channel->chname, mbuf, pbuf);
|
||||
sendto_server(NULL, 0, 0, mtags, ":%s MODE %s %s %s 0", me.id, channel->chname, mbuf, pbuf);
|
||||
free_message_tags(mtags);
|
||||
*pbuf = 0;
|
||||
}
|
||||
@@ -485,7 +485,7 @@ void add_send_mode_param(Channel *channel, Client *from, char what, char mode, c
|
||||
|
||||
new_message(&me, NULL, &mtags);
|
||||
sendto_channel(channel, &me, NULL, 0, 0, SEND_LOCAL, mtags, ":%s MODE %s %s %s", me.name, channel->chname, mbuf, pbuf);
|
||||
sendto_server(NULL, 0, 0, mtags, ":%s MODE %s %s %s 0", me.name, channel->chname, mbuf, pbuf);
|
||||
sendto_server(NULL, 0, 0, mtags, ":%s MODE %s %s %s 0", me.id, channel->chname, mbuf, pbuf);
|
||||
free_message_tags(mtags);
|
||||
send = 0;
|
||||
*pbuf = 0;
|
||||
|
||||
+3
-3
@@ -234,7 +234,7 @@ void _send_join_to_local_users(Client *client, Channel *channel, MessageTag *mta
|
||||
void _join_channel(Channel *channel, Client *client, MessageTag *recv_mtags, int flags)
|
||||
{
|
||||
MessageTag *mtags = NULL; /** Message tags to send to local users (sender is :user) */
|
||||
MessageTag *mtags_sjoin = NULL; /* Message tags to send to remote servers for SJOIN (sender is :me.name) */
|
||||
MessageTag *mtags_sjoin = NULL; /* Message tags to send to remote servers for SJOIN (sender is :me.id) */
|
||||
char *parv[] = { 0, 0 };
|
||||
|
||||
/* Same way as in SJOIN */
|
||||
@@ -261,7 +261,7 @@ void _join_channel(Channel *channel, Client *client, MessageTag *recv_mtags, int
|
||||
{
|
||||
channel->creationtime = TStime();
|
||||
sendto_server(client, 0, 0, NULL, ":%s MODE %s + %lld",
|
||||
me.name, channel->chname, (long long)channel->creationtime);
|
||||
me.id, channel->chname, (long long)channel->creationtime);
|
||||
}
|
||||
del_invite(client, channel);
|
||||
|
||||
@@ -299,7 +299,7 @@ void _join_channel(Channel *channel, Client *client, MessageTag *recv_mtags, int
|
||||
/* This should probably be in the SJOIN stuff */
|
||||
new_message_special(&me, recv_mtags, &mtags_mode, ":%s MODE %s %s %s", me.name, channel->chname, modebuf, parabuf);
|
||||
sendto_server(&me, 0, 0, mtags_mode, ":%s MODE %s %s %s %lld",
|
||||
me.name, channel->chname, modebuf, parabuf, (long long)channel->creationtime);
|
||||
me.id, channel->chname, modebuf, parabuf, (long long)channel->creationtime);
|
||||
sendto_one(client, mtags_mode, ":%s MODE %s %s %s", me.name, channel->chname, modebuf, parabuf);
|
||||
free_message_tags(mtags_mode);
|
||||
}
|
||||
|
||||
+4
-4
@@ -351,7 +351,7 @@ void _send_moddata_client(Client *srv, Client *client)
|
||||
char *value = mdi->serialize(&moddata_client(client, mdi));
|
||||
if (value)
|
||||
sendto_one(srv, NULL, ":%s MD %s %s %s :%s",
|
||||
me.name, "client", client->id, mdi->name, value);
|
||||
me.id, "client", client->id, mdi->name, value);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -368,7 +368,7 @@ void _send_moddata_channel(Client *srv, Channel *channel)
|
||||
char *value = mdi->serialize(&moddata_channel(channel, mdi));
|
||||
if (value)
|
||||
sendto_one(srv, NULL, ":%s MD %s %s %s :%s",
|
||||
me.name, "channel", channel->chname, mdi->name, value);
|
||||
me.id, "channel", channel->chname, mdi->name, value);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -395,7 +395,7 @@ void _send_moddata_members(Client *srv)
|
||||
char *value = mdi->serialize(&moddata_member(m, mdi));
|
||||
if (value)
|
||||
sendto_one(srv, NULL, ":%s MD %s %s:%s %s :%s",
|
||||
me.name, "member", channel->chname, client->id, mdi->name, value);
|
||||
me.id, "member", channel->chname, client->id, mdi->name, value);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -419,7 +419,7 @@ void _send_moddata_members(Client *srv)
|
||||
char *value = mdi->serialize(&moddata_membership(m, mdi));
|
||||
if (value)
|
||||
sendto_one(srv, NULL, ":%s MD %s %s:%s %s :%s",
|
||||
me.name, "membership", client->id, m->channel->chname, mdi->name, value);
|
||||
me.id, "membership", client->id, m->channel->chname, mdi->name, value);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+5
-5
@@ -375,10 +375,10 @@ static void bounce_mode(Channel *channel, Client *client, int parc, char *parv[]
|
||||
set_mode(channel, client, parc, parv, &pcount, pvar, 1);
|
||||
|
||||
if (channel->creationtime)
|
||||
sendto_one(client, NULL, ":%s MODE %s &%s %s %lld", me.name,
|
||||
sendto_one(client, NULL, ":%s MODE %s &%s %s %lld", me.id,
|
||||
channel->chname, modebuf, parabuf, (long long)channel->creationtime);
|
||||
else
|
||||
sendto_one(client, NULL, ":%s MODE %s &%s %s", me.name, channel->chname,
|
||||
sendto_one(client, NULL, ":%s MODE %s &%s %s", me.id, channel->chname,
|
||||
modebuf, parabuf);
|
||||
|
||||
/* the '&' denotes a bounce so servers won't bounce a bounce */
|
||||
@@ -452,11 +452,11 @@ void _do_mode(Channel *channel, Client *client, MessageTag *recv_mtags, int parc
|
||||
if (channel->creationtime)
|
||||
{
|
||||
sendto_server(client, 0, 0, NULL, ":%s MODE %s %s+ %lld",
|
||||
me.name, channel->chname, isbounce ? "&" : "",
|
||||
me.id, channel->chname, isbounce ? "&" : "",
|
||||
(long long)channel->creationtime);
|
||||
} else {
|
||||
sendto_server(client, 0, 0, NULL, ":%s MODE %s %s+",
|
||||
me.name, channel->chname, isbounce ? "&" : "");
|
||||
me.id, channel->chname, isbounce ? "&" : "");
|
||||
}
|
||||
free_message_tags(mtags);
|
||||
return; /* nothing to send */
|
||||
@@ -1685,7 +1685,7 @@ CMD_FUNC(_cmd_umode)
|
||||
if (IsQuarantined(client->direction))
|
||||
{
|
||||
sendto_realops("QUARANTINE: Oper %s on server %s killed, due to quarantine", client->name, client->srvptr->name);
|
||||
sendto_server(NULL, 0, 0, NULL, ":%s KILL %s :%s (Quarantined: no oper privileges allowed)", me.name, client->name, me.name);
|
||||
sendto_server(NULL, 0, 0, NULL, ":%s KILL %s :%s (Quarantined: no oper privileges allowed)", me.id, client->name, me.name);
|
||||
exit_client(client, NULL, "Quarantined: no oper privileges allowed");
|
||||
return;
|
||||
}
|
||||
|
||||
+3
-3
@@ -69,12 +69,12 @@ CMD_FUNC(cmd_names)
|
||||
int multiprefix = (MyConnect(client) && HasCapability(client, "multi-prefix"));
|
||||
int uhnames = (MyConnect(client) && HasCapability(client, "userhost-in-names")); // cache UHNAMES support
|
||||
int bufLen = NICKLEN + (!uhnames ? 0 : (1 + USERLEN + 1 + HOSTLEN));
|
||||
int mlen = strlen(me.name) + bufLen + 7;
|
||||
int mlen = strlen(me.name) + bufLen + 7;
|
||||
Channel *channel;
|
||||
Client *acptr;
|
||||
int member;
|
||||
int member;
|
||||
Member *cm;
|
||||
int idx, flag = 1, spos;
|
||||
int idx, flag = 1, spos;
|
||||
char *s, *para = parv[1];
|
||||
char nuhBuffer[NICKLEN+USERLEN+HOSTLEN+3];
|
||||
|
||||
|
||||
@@ -113,7 +113,7 @@ CMD_FUNC(cmd_netinfo)
|
||||
client->name, (long long)(xx), (long long)(endsync), (long long)(xx - endsync), emsg);
|
||||
sendto_server(&me, 0, 0, NULL,
|
||||
":%s SMO o :\2(sync)\2 Possible negative TS split at link %s (%lld - %lld = %lld)%s",
|
||||
me.name, client->name, (long long)(xx), (long long)(endsync), (long long)(xx - endsync), emsg);
|
||||
me.id, client->name, (long long)(xx), (long long)(endsync), (long long)(xx - endsync), emsg);
|
||||
}
|
||||
sendto_realops
|
||||
("Link %s -> %s is now synced [secs: %lld recv: %ld.%hu sent: %ld.%hu]",
|
||||
@@ -122,7 +122,7 @@ CMD_FUNC(cmd_netinfo)
|
||||
|
||||
sendto_server(&me, 0, 0, NULL,
|
||||
":%s SMO o :\2(sync)\2 Link %s -> %s is now synced [secs: %lld recv: %ld.%hu sent: %ld.%hu]",
|
||||
me.name, client->name, me.name, (long long)(TStime() - endsync), client->local->receiveK,
|
||||
me.id, client->name, me.name, (long long)(TStime() - endsync), client->local->receiveK,
|
||||
client->local->receiveB, client->local->sendK, client->local->sendB);
|
||||
|
||||
if (!(strcmp(ircnetwork, parv[8]) == 0))
|
||||
@@ -131,7 +131,7 @@ CMD_FUNC(cmd_netinfo)
|
||||
client->name, parv[8], ircnetwork);
|
||||
sendto_server(&me, 0, 0, NULL,
|
||||
":%s SMO o :\2(sync)\2 Network name mismatch from link %s (%s != %s)",
|
||||
me.name, client->name, parv[8], ircnetwork);
|
||||
me.id, client->name, parv[8], ircnetwork);
|
||||
}
|
||||
|
||||
if ((protocol != UnrealProtocol) && (protocol != 0))
|
||||
@@ -141,7 +141,7 @@ CMD_FUNC(cmd_netinfo)
|
||||
client->name, protocol, UnrealProtocol);
|
||||
sendto_server(&me, 0, 0, NULL,
|
||||
":%s SMO o :\2(sync)\2 Link %s is running u%li while %s is running %d!",
|
||||
me.name, client->name, protocol, me.name, UnrealProtocol);
|
||||
me.id, client->name, protocol, me.name, UnrealProtocol);
|
||||
|
||||
}
|
||||
strlcpy(buf, CLOAK_KEYCRC, sizeof(buf));
|
||||
|
||||
+19
-19
@@ -391,8 +391,7 @@ CMD_FUNC(cmd_nick_local)
|
||||
{
|
||||
/* Send a CTCP VERSION */
|
||||
if (!iConf.ping_cookie && USE_BAN_VERSION && MyConnect(client))
|
||||
sendto_one(client, NULL, ":IRC!IRC@%s PRIVMSG %s :\1VERSION\1",
|
||||
me.name, nick);
|
||||
sendto_one(client, NULL, ":IRC!IRC@%s PRIVMSG %s :\1VERSION\1", me.name, nick);
|
||||
|
||||
client->lastnick = TStime();
|
||||
if (!register_user(client, nick, client->user->username, NULL, NULL, NULL))
|
||||
@@ -547,7 +546,7 @@ CMD_FUNC(cmd_uid)
|
||||
parv[1], client->name, get_client_name(client, FALSE));
|
||||
/* Send kill to uplink only, hasn't been broadcasted to the rest, anyway */
|
||||
sendto_one(client, NULL, ":%s KILL %s :%s (%s <- %s[%s])",
|
||||
me.name, parv[1], me.name, parv[1],
|
||||
me.id, parv[1], me.name, parv[1],
|
||||
nick, client->name);
|
||||
return;
|
||||
}
|
||||
@@ -558,7 +557,7 @@ CMD_FUNC(cmd_uid)
|
||||
ircstats.is_kill++;
|
||||
/* Send kill to uplink only, hasn't been broadcasted to the rest, anyway */
|
||||
sendto_one(client, NULL, ":%s KILL %s :%s (Quarantined: no oper privileges allowed)",
|
||||
me.name, parv[1], me.name);
|
||||
me.id, parv[1], me.name);
|
||||
sendto_realops("QUARANTINE: Oper %s on server %s killed, due to quarantine",
|
||||
parv[1], client->name);
|
||||
return;
|
||||
@@ -569,7 +568,7 @@ CMD_FUNC(cmd_uid)
|
||||
{
|
||||
sendnumeric(client, ERR_ERRONEUSNICKNAME, nick, "Reserved for internal IRCd purposes");
|
||||
sendto_one(client, NULL, ":%s KILL %s :%s (%s <- %s[%s])",
|
||||
me.name, parv[1], me.name, parv[1],
|
||||
me.id, parv[1], me.name, parv[1],
|
||||
nick, client->name);
|
||||
return;
|
||||
}
|
||||
@@ -596,7 +595,7 @@ CMD_FUNC(cmd_uid)
|
||||
get_client_name(client, FALSE));
|
||||
ircstats.is_kill++;
|
||||
sendto_one(client, NULL, ":%s KILL %s :%s (%s <- %s)",
|
||||
me.name, parv[1], me.name, acptr->direction->name,
|
||||
me.id, parv[1], me.name, acptr->direction->name,
|
||||
get_client_name(client, FALSE));
|
||||
return;
|
||||
}
|
||||
@@ -943,19 +942,20 @@ int _register_user(Client *client, char *nick, char *username, char *umode, char
|
||||
else
|
||||
ircd_log(LOG_CLIENT, "Connect - %s!%s@%s", nick, user->username,
|
||||
user->realhost);
|
||||
|
||||
RunHook2(HOOKTYPE_WELCOME, client, 0);
|
||||
sendnumeric(client, RPL_WELCOME,
|
||||
ircnetwork, nick, user->username, user->realhost);
|
||||
sendnumeric(client, RPL_WELCOME, ircnetwork, nick, user->username, user->realhost);
|
||||
|
||||
RunHook2(HOOKTYPE_WELCOME, client, 1);
|
||||
sendnumeric(client, RPL_YOURHOST,
|
||||
me.name, version);
|
||||
sendnumeric(client, RPL_YOURHOST, me.name, version);
|
||||
|
||||
RunHook2(HOOKTYPE_WELCOME, client, 2);
|
||||
sendnumeric(client, RPL_CREATED, creation);
|
||||
RunHook2(HOOKTYPE_WELCOME, client, 3);
|
||||
sendnumeric(client, RPL_MYINFO,
|
||||
me.name, version, umodestring, cmodestring);
|
||||
RunHook2(HOOKTYPE_WELCOME, client, 4);
|
||||
|
||||
RunHook2(HOOKTYPE_WELCOME, client, 3);
|
||||
sendnumeric(client, RPL_MYINFO, me.name, version, umodestring, cmodestring);
|
||||
|
||||
RunHook2(HOOKTYPE_WELCOME, client, 4);
|
||||
for (i = 0; ISupportStrings[i]; i++)
|
||||
sendnumeric(client, RPL_ISUPPORT, ISupportStrings[i]);
|
||||
|
||||
@@ -1014,7 +1014,7 @@ int _register_user(Client *client, char *nick, char *username, char *umode, char
|
||||
sendto_ops("Bad USER [%s] :%s USER %s %s : No such server",
|
||||
client->name, nick, user->username, user->server);
|
||||
sendto_one(client, NULL, ":%s KILL %s :%s (No such server: %s)",
|
||||
me.name, client->name, me.name, user->server);
|
||||
me.id, client->name, me.name, user->server);
|
||||
SetKilled(client);
|
||||
exit_client(client, NULL, "USER without prefix(2.8) or wrong prefix");
|
||||
return 0;
|
||||
@@ -1025,7 +1025,7 @@ int _register_user(Client *client, char *nick, char *username, char *umode, char
|
||||
client->name, nick, user->username, user->server,
|
||||
acptr->name, acptr->direction->name);
|
||||
sendto_one(client, NULL, ":%s KILL %s :%s (%s != %s[%s])",
|
||||
me.name, client->name, me.name, user->server,
|
||||
me.id, client->name, me.name, user->server,
|
||||
acptr->direction->name, acptr->direction->local->sockhost);
|
||||
SetKilled(client);
|
||||
exit_client(client, NULL, "USER server wrong direction");
|
||||
@@ -1219,7 +1219,7 @@ void nick_collision(Client *cptr, char *newnick, char *newid, Client *new, Clien
|
||||
/* cptr case first... this side knows the user by newnick/newid */
|
||||
/* SID server can kill 'new' by ID */
|
||||
sendto_one(cptr, NULL, ":%s KILL %s :%s (%s)",
|
||||
me.name, newid, me.name, comment);
|
||||
me.id, newid, me.name, comment);
|
||||
|
||||
/* non-cptr case... only necessary if nick-changing. */
|
||||
if (new)
|
||||
@@ -1231,7 +1231,7 @@ void nick_collision(Client *cptr, char *newnick, char *newid, Client *new, Clien
|
||||
/* non-cptr side knows this user by their old nick name */
|
||||
sendto_server(cptr, 0, 0, mtags,
|
||||
":%s KILL %s :%s (%s)",
|
||||
me.name, new->id, me.name, comment);
|
||||
me.id, new->id, me.name, comment);
|
||||
|
||||
/* Exit the client */
|
||||
ircstats.is_kill++;
|
||||
@@ -1251,7 +1251,7 @@ void nick_collision(Client *cptr, char *newnick, char *newid, Client *new, Clien
|
||||
/* Now let's kill 'existing' */
|
||||
sendto_server(NULL, 0, 0, mtags,
|
||||
":%s KILL %s :%s (%s)",
|
||||
me.name, existing->id, me.name, comment);
|
||||
me.id, existing->id, me.name, comment);
|
||||
|
||||
/* NOTE: we may have sent two KILLs on the same nick in some cases.
|
||||
* Should be acceptable and only happens in a non-100% UID network.
|
||||
|
||||
@@ -505,7 +505,7 @@ int reputation_pre_lconnect(Client *client)
|
||||
* server to server traffic, see the reputation_server_cmd function.
|
||||
*/
|
||||
ReputationEntry *e = find_reputation_entry(GetIP(client));
|
||||
sendto_server(NULL, 0, 0, NULL, ":%s REPUTATION %s %d", me.name, GetIP(client), e ? (int)e->score : 0);
|
||||
sendto_server(NULL, 0, 0, NULL, ":%s REPUTATION %s %d", me.id, GetIP(client), e ? (int)e->score : 0);
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -789,7 +789,7 @@ CMD_FUNC(reputation_server_cmd)
|
||||
/* We have a higher score, inform the client direction about it.
|
||||
* This will prefix the score with a * so servers will never reply to it.
|
||||
*/
|
||||
sendto_one(client, NULL, ":%s REPUTATION %s *%d", me.name, parv[1], e->score);
|
||||
sendto_one(client, NULL, ":%s REPUTATION %s *%d", me.id, parv[1], e->score);
|
||||
#ifdef DEBUGMODE
|
||||
ircd_log(LOG_ERROR, "[reputation] Score for '%s' from %s is %d, but we have %d, sending back %d",
|
||||
ip, client->name, score, e->score, e->score);
|
||||
|
||||
@@ -283,7 +283,7 @@ CMD_FUNC(cmd_sajoin)
|
||||
sendnotice(target, "*** You were forced to join %s", jbuf);
|
||||
sendto_realops("%s used SAJOIN to make %s join %s", client->name, target->name, jbuf);
|
||||
sendto_server(&me, 0, 0, NULL, ":%s GLOBOPS :%s used SAJOIN to make %s join %s",
|
||||
me.name, client->name, target->name, jbuf);
|
||||
me.id, client->name, target->name, jbuf);
|
||||
/* Logging function added by XeRXeS */
|
||||
ircd_log(LOG_SACMDS,"SAJOIN: %s used SAJOIN to make %s join %s",
|
||||
client->name, parv[1], jbuf);
|
||||
@@ -293,7 +293,7 @@ CMD_FUNC(cmd_sajoin)
|
||||
sendnotice(target, "*** You were forced to join %s with '%c'", jbuf, sjmode);
|
||||
sendto_realops("%s used SAJOIN to make %s join %c%s", client->name, target->name, sjmode, jbuf);
|
||||
sendto_server(&me, 0, 0, NULL, ":%s GLOBOPS :%s used SAJOIN to make %s join %c%s",
|
||||
me.name, client->name, target->name, sjmode, jbuf);
|
||||
me.id, client->name, target->name, sjmode, jbuf);
|
||||
ircd_log(LOG_SACMDS,"SAJOIN: %s used SAJOIN to make %s join %c%s",
|
||||
client->name, parv[1], sjmode, jbuf);
|
||||
}
|
||||
|
||||
@@ -154,7 +154,7 @@ CMD_FUNC(cmd_sapart)
|
||||
sendto_realops("%s used SAPART to make %s part %s (%s)", client->name, target->name,
|
||||
parv[1], comment);
|
||||
sendto_server(&me, 0, 0, NULL, ":%s GLOBOPS :%s used SAPART to make %s part %s (%s)",
|
||||
me.name, client->name, target->name, parv[1], comment);
|
||||
me.id, client->name, target->name, parv[1], comment);
|
||||
/* Logging function added by XeRXeS */
|
||||
ircd_log(LOG_SACMDS,"SAPART: %s used SAPART to make %s part %s (%s)",
|
||||
client->name, target->name, parv[1], comment);
|
||||
@@ -166,7 +166,7 @@ CMD_FUNC(cmd_sapart)
|
||||
sendto_realops("%s used SAPART to make %s part %s", client->name, target->name,
|
||||
parv[1]);
|
||||
sendto_server(&me, 0, 0, NULL, ":%s GLOBOPS :%s used SAPART to make %s part %s",
|
||||
me.name, client->name, target->name, parv[1]);
|
||||
me.id, client->name, target->name, parv[1]);
|
||||
/* Logging function added by XeRXeS */
|
||||
ircd_log(LOG_SACMDS,"SAPART: %s used SAPART to make %s part %s",
|
||||
client->name, target->name, parv[1]);
|
||||
|
||||
@@ -794,11 +794,11 @@ void _introduce_user(Client *to, Client *acptr)
|
||||
if (CHECKPROTO(to, PROTO_EXTSWHOIS))
|
||||
{
|
||||
sendto_one(to, NULL, ":%s SWHOIS %s + %s %d :%s",
|
||||
me.name, acptr->name, s->setby, s->priority, s->line);
|
||||
me.id, acptr->name, s->setby, s->priority, s->line);
|
||||
} else
|
||||
{
|
||||
sendto_one(to, NULL, ":%s SWHOIS %s :%s",
|
||||
me.name, acptr->name, s->line);
|
||||
me.id, acptr->name, s->line);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -957,7 +957,7 @@ int server_sync(Client *cptr, ConfigItem_link *aconf)
|
||||
if (IsSecure(cptr))
|
||||
{
|
||||
sendto_server(&me, 0, 0, NULL, ":%s SMO o :(\2link\2) Secure link %s -> %s established (%s)",
|
||||
me.name,
|
||||
me.id,
|
||||
me.name, inpath, tls_get_cipher(cptr->local->ssl));
|
||||
sendto_realops("(\2link\2) Secure link %s -> %s established (%s)",
|
||||
me.name, inpath, tls_get_cipher(cptr->local->ssl));
|
||||
@@ -966,7 +966,7 @@ int server_sync(Client *cptr, ConfigItem_link *aconf)
|
||||
else
|
||||
{
|
||||
sendto_server(&me, 0, 0, NULL, ":%s SMO o :(\2link\2) Link %s -> %s established",
|
||||
me.name,
|
||||
me.id,
|
||||
me.name, inpath);
|
||||
sendto_realops("(\2link\2) Link %s -> %s established",
|
||||
me.name, inpath);
|
||||
|
||||
+1
-2
@@ -490,8 +490,7 @@ getnick:
|
||||
|
||||
sendto_one(client, NULL,
|
||||
":%s KICK %s %s :Fake direction",
|
||||
me.name, channel->chname,
|
||||
acptr->name);
|
||||
me.id, channel->chname, acptr->name);
|
||||
sendto_realops
|
||||
("Fake direction from user %s in SJOIN from %s(%s) at %s",
|
||||
nick, client->srvptr->name,
|
||||
|
||||
+1
-1
@@ -144,7 +144,7 @@ CMD_FUNC(cmd_squit)
|
||||
client->name, target->name, comment);
|
||||
sendto_server(&me, 0, 0, NULL,
|
||||
":%s GLOBOPS :%s tried to fake kill using SQUIT (%s (%s))",
|
||||
me.name, client->name, target->name, comment);
|
||||
me.id, client->name, target->name, comment);
|
||||
return;
|
||||
}
|
||||
sendto_umode_global(UMODE_OPER, "Received SQUIT %s from %s (%s)",
|
||||
|
||||
+1
-3
@@ -210,9 +210,7 @@ CMD_FUNC(cmd_watch)
|
||||
{
|
||||
sendnumeric(client, RPL_WATCHLIST, buf);
|
||||
*buf = '\0';
|
||||
count =
|
||||
strlen(client->name) + strlen(me.name) +
|
||||
10;
|
||||
count = strlen(client->name) + strlen(me.name) + 10;
|
||||
}
|
||||
strcat(buf, " ");
|
||||
strcat(buf, lp->value.wptr->nick);
|
||||
|
||||
+2
-2
@@ -594,8 +594,8 @@ static void remove_unknown(Client *client, char *sender)
|
||||
*/
|
||||
if ((isdigit(*sender) && strlen(sender) <= SIDLEN) || strchr(sender, '.'))
|
||||
sendto_one(client, NULL, ":%s SQUIT %s :(Unknown prefix (%s) from %s)",
|
||||
me.name, sender, sender, client->name);
|
||||
me.id, sender, sender, client->name);
|
||||
else
|
||||
sendto_one(client, NULL, ":%s KILL %s :%s (%s(?) <- %s)",
|
||||
me.name, sender, me.name, sender, client->name);
|
||||
me.id, sender, me.name, sender, client->name);
|
||||
}
|
||||
|
||||
+8
-11
@@ -667,9 +667,8 @@ void sendto_umode(int umodes, FORMAT_STRING(const char *pattern), ...)
|
||||
list_for_each_entry(acptr, &lclient_list, lclient_node)
|
||||
if (IsUser(acptr) && (acptr->umodes & umodes) == umodes)
|
||||
{
|
||||
(void)ircsnprintf(nbuf, sizeof(nbuf), ":%s NOTICE %s :",
|
||||
me.name, acptr->name);
|
||||
(void)strlcat(nbuf, pattern, sizeof nbuf);
|
||||
ircsnprintf(nbuf, sizeof(nbuf), ":%s NOTICE %s :", me.name, acptr->name);
|
||||
strlcat(nbuf, pattern, sizeof nbuf);
|
||||
|
||||
va_start(vl, pattern);
|
||||
vsendto_one(acptr, NULL, nbuf, vl);
|
||||
@@ -707,9 +706,8 @@ void sendto_umode_global(int umodes, FORMAT_STRING(const char *pattern), ...)
|
||||
{
|
||||
if (IsUser(acptr) && (acptr->umodes & umodes) == umodes)
|
||||
{
|
||||
(void)ircsnprintf(nbuf, sizeof(nbuf), ":%s NOTICE %s :",
|
||||
me.name, acptr->name);
|
||||
(void)strlcat(nbuf, pattern, sizeof nbuf);
|
||||
ircsnprintf(nbuf, sizeof(nbuf), ":%s NOTICE %s :", me.name, acptr->name);
|
||||
strlcat(nbuf, pattern, sizeof nbuf);
|
||||
|
||||
va_start(vl, pattern);
|
||||
vsendto_one(acptr, NULL, nbuf, vl);
|
||||
@@ -717,7 +715,7 @@ void sendto_umode_global(int umodes, FORMAT_STRING(const char *pattern), ...)
|
||||
} else
|
||||
if (IsServer(acptr) && *modestr)
|
||||
{
|
||||
snprintf(nbuf, sizeof(nbuf), ":%s SENDUMODE %s :%s", me.name, modestr, pattern);
|
||||
snprintf(nbuf, sizeof(nbuf), ":%s SENDUMODE %s :%s", me.id, modestr, pattern);
|
||||
va_start(vl, pattern);
|
||||
vsendto_one(acptr, NULL, nbuf, vl);
|
||||
va_end(vl);
|
||||
@@ -776,7 +774,7 @@ void sendto_snomask_global(int snomask, FORMAT_STRING(const char *pattern), ...)
|
||||
*p++ = Snomask_Table[i].flag;
|
||||
*p = '\0';
|
||||
|
||||
sendto_server(&me, 0, 0, NULL, ":%s SENDSNO %s :%s", me.name, snobuf, nbuf);
|
||||
sendto_server(&me, 0, 0, NULL, ":%s SENDSNO %s :%s", me.id, snobuf, nbuf);
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -950,9 +948,8 @@ void sendto_realops(FORMAT_STRING(const char *pattern), ...)
|
||||
|
||||
list_for_each_entry(acptr, &oper_list, special_node)
|
||||
{
|
||||
(void)ircsnprintf(nbuf, sizeof(nbuf), ":%s NOTICE %s :*** ",
|
||||
me.name, acptr->name);
|
||||
(void)strlcat(nbuf, pattern, sizeof nbuf);
|
||||
ircsnprintf(nbuf, sizeof(nbuf), ":%s NOTICE %s :*** ", me.name, acptr->name);
|
||||
strlcat(nbuf, pattern, sizeof nbuf);
|
||||
|
||||
va_start(vl, pattern);
|
||||
vsendto_one(acptr, NULL, nbuf, vl);
|
||||
|
||||
Reference in New Issue
Block a user