1
mirror of git://git.acid.vegas/IRCP.git synced 2024-11-26 01:46:39 +00:00

Better formatting * channel errors output

This commit is contained in:
Dionysus 2023-05-31 00:23:03 -04:00
parent 483e21ab25
commit 03a2e8c4a5
Signed by: acidvegas
GPG Key ID: EF4B922DB85DC9DE
2 changed files with 6 additions and 5 deletions

View File

@ -152,8 +152,8 @@ With that being said, the ability for anyone to be able to do what this project
* Checking for IPv6 availability *(SSL= in 005 responses may help verify IPv6)*
* Support for IRC servers using old versions of SSL
* Create a seperate log for failed connections *(Sync to file every hour maybe)*
* Add snapshot boolean for rbl/proxy detection/scanning
* Ability to link multiple IRCP instances running in daemon mode together for balancing
* Remote syncing the logs to another server
## Mirrors
- [acid.vegas](https://git.acid.vegas/ircp)

View File

@ -148,7 +148,7 @@ def ssl_ctx():
class probe:
def __init__(self, server, semaphore):
self.server = server
self.display = server.ljust(18)+' \033[30m|\033[0m '
self.display = server.ljust(18)+' \033[30m|\033[0m unknown network \033[30m|\033[0m '
self.semaphore = semaphore
self.nickname = None
self.snapshot = {'raw':list()}
@ -312,11 +312,12 @@ class probe:
self.snapshot[numeric] = [self.snapshot[numeric], line]
else:
self.snapshot['raw'].append(line)
if numeric in ('470','471','473','747','475','477','489','519','520'):
if numeric in ('405','470','471','473','747','475','477','489','519','520') and len(args) >= 5:
chan = args[3]
msg = ' '.join(args[4:])[1:]
if chan in self.channels['users']:
del self.channels['users'][chan]
error(f'{self.display}\033[31merror\033[0m - {chan}', line)
error(f'{self.display}\033[31merror\033[0m - {chan}', msg)
elif line.startswith('ERROR :Closing Link') and 'dronebl' in line.lower():
self.snapshot['proxy'] = True
error(self.display + '\033[93mDroneBL detected\033[30m')
@ -355,7 +356,7 @@ class probe:
elif numeric == '323': # RPL_LISTEND
if self.channels['all']:
del self.loops['init']
debug(self.display + 'found \033[93m{0}\033[0m channel(s)'.format(str(len(self.channels['all']))))
debug(self.display + '\033[36mLIST\033[0m found \033[93m{0}\033[0m channel(s)'.format(str(len(self.channels['all']))))
self.loops['chan'] = asyncio.create_task(self.loop_channels())
self.loops['nick'] = asyncio.create_task(self.loop_nick())
self.loops['whois'] = asyncio.create_task(self.loop_whois())