mirror of
git://git.acid.vegas/IRCP.git
synced 2024-11-26 09:56:42 +00:00
Better formatting * channel errors output
This commit is contained in:
parent
483e21ab25
commit
03a2e8c4a5
@ -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)*
|
* Checking for IPv6 availability *(SSL= in 005 responses may help verify IPv6)*
|
||||||
* Support for IRC servers using old versions of SSL
|
* Support for IRC servers using old versions of SSL
|
||||||
* Create a seperate log for failed connections *(Sync to file every hour maybe)*
|
* 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
|
* Ability to link multiple IRCP instances running in daemon mode together for balancing
|
||||||
|
* Remote syncing the logs to another server
|
||||||
|
|
||||||
## Mirrors
|
## Mirrors
|
||||||
- [acid.vegas](https://git.acid.vegas/ircp)
|
- [acid.vegas](https://git.acid.vegas/ircp)
|
||||||
|
9
ircp.py
9
ircp.py
@ -148,7 +148,7 @@ def ssl_ctx():
|
|||||||
class probe:
|
class probe:
|
||||||
def __init__(self, server, semaphore):
|
def __init__(self, server, semaphore):
|
||||||
self.server = server
|
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.semaphore = semaphore
|
||||||
self.nickname = None
|
self.nickname = None
|
||||||
self.snapshot = {'raw':list()}
|
self.snapshot = {'raw':list()}
|
||||||
@ -312,11 +312,12 @@ class probe:
|
|||||||
self.snapshot[numeric] = [self.snapshot[numeric], line]
|
self.snapshot[numeric] = [self.snapshot[numeric], line]
|
||||||
else:
|
else:
|
||||||
self.snapshot['raw'].append(line)
|
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]
|
chan = args[3]
|
||||||
|
msg = ' '.join(args[4:])[1:]
|
||||||
if chan in self.channels['users']:
|
if chan in self.channels['users']:
|
||||||
del self.channels['users'][chan]
|
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():
|
elif line.startswith('ERROR :Closing Link') and 'dronebl' in line.lower():
|
||||||
self.snapshot['proxy'] = True
|
self.snapshot['proxy'] = True
|
||||||
error(self.display + '\033[93mDroneBL detected\033[30m')
|
error(self.display + '\033[93mDroneBL detected\033[30m')
|
||||||
@ -355,7 +356,7 @@ class probe:
|
|||||||
elif numeric == '323': # RPL_LISTEND
|
elif numeric == '323': # RPL_LISTEND
|
||||||
if self.channels['all']:
|
if self.channels['all']:
|
||||||
del self.loops['init']
|
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['chan'] = asyncio.create_task(self.loop_channels())
|
||||||
self.loops['nick'] = asyncio.create_task(self.loop_nick())
|
self.loops['nick'] = asyncio.create_task(self.loop_nick())
|
||||||
self.loops['whois'] = asyncio.create_task(self.loop_whois())
|
self.loops['whois'] = asyncio.create_task(self.loop_whois())
|
||||||
|
Loading…
Reference in New Issue
Block a user