mirror of
https://github.com/jlu5/PyLink.git
synced 2025-01-11 20:52:42 +01:00
Clientbot: use a more specific realname fallback
(cherry picked from commit 288a2fffd7
)
This is cherry-picked as a prerequisite for the next commit.
This commit is contained in:
parent
9e6e30324f
commit
eb64190228
@ -6,6 +6,7 @@ from pylinkirc import utils, conf
|
||||
from pylinkirc.log import log
|
||||
from pylinkirc.classes import Protocol, IrcUser, IrcServer
|
||||
|
||||
FALLBACK_REALNAME = 'PyLink Relay Mirror Client'
|
||||
COMMON_PREFIXMODES = [('h', 'halfop'), ('a', 'admin'), ('q', 'owner'), ('y', 'owner')]
|
||||
|
||||
class ClientbotWrapperProtocol(Protocol):
|
||||
@ -313,7 +314,7 @@ class ClientbotWrapperProtocol(Protocol):
|
||||
|
||||
if (not idsource) and self.irc.pseudoclient:
|
||||
# We don't know the sender, so it most be new.
|
||||
idsource = self.spawnClient(nick, ident, host, server=self.irc.uplink).uid
|
||||
idsource = self.spawnClient(nick, ident, host, server=self.irc.uplink, realname=FALLBACK_REALNAME).uid
|
||||
|
||||
try:
|
||||
func = getattr(self, 'handle_'+command.lower())
|
||||
@ -402,7 +403,7 @@ class ClientbotWrapperProtocol(Protocol):
|
||||
# Get the PUID for the given nick. If one doesn't exist, spawn
|
||||
# a new virtual user. TODO: wait for WHO responses for each nick before
|
||||
# spawning in order to get a real ident/host.
|
||||
idsource = self.irc.nickToUid(nick) or self.spawnClient(nick, server=self.irc.uplink).uid
|
||||
idsource = self.irc.nickToUid(nick) or self.spawnClient(nick, server=self.irc.uplink, realname=FALLBACK_REALNAME).uid
|
||||
|
||||
# Queue these virtual users to be joined if they're not already in the channel,
|
||||
# or we're waiting for a kick acknowledgment for them.
|
||||
|
Loading…
Reference in New Issue
Block a user