irc: simplify prefix selection in reply command code
patch b97c6c1dbe715d083b40ae6c287e0de614af7f7a
Author: E. Bosch <presidev@AT@gmail.com>
Date: Wed Feb 10 19:56:07 CET 2021
* irc: simplify prefix selection in reply command code
diff -rN -u old-irgramd/irc.py new-irgramd/irc.py
--- old-irgramd/irc.py 2024-11-23 03:13:03.254746001 +0100
+++ new-irgramd/irc.py 2024-11-23 03:13:03.254746001 +0100
@@ -226,10 +226,7 @@
# IRC functions
async def reply_command(self, user, prfx, comm, params):
- if prfx == SRV:
- prefix = self.hostname
- else:
- prefix = prfx.get_irc_mask()
+ prefix = self.hostname if prfx == SRV else prfx.get_irc_mask()
p = len(params)
if p == 1:
fstri = ':{} {} {}'