mirror of
https://github.com/jlu5/PyLink.git
synced 2024-12-26 04:32:51 +01:00
Move NotAuthenticatedError class back into utils
This is needed because ServiceBot exists in utils, and utils cannot import classes without a bad import loop happening.
This commit is contained in:
parent
7d11f8c7e0
commit
0c7faed213
@ -27,13 +27,6 @@ import structures
|
|||||||
class ProtocolError(Exception):
|
class ProtocolError(Exception):
|
||||||
pass
|
pass
|
||||||
|
|
||||||
class NotAuthenticatedError(Exception):
|
|
||||||
"""
|
|
||||||
Exception raised by checkAuthenticated() when a user fails authentication
|
|
||||||
requirements.
|
|
||||||
"""
|
|
||||||
pass
|
|
||||||
|
|
||||||
### Internal classes (users, servers, channels)
|
### Internal classes (users, servers, channels)
|
||||||
|
|
||||||
class Irc():
|
class Irc():
|
||||||
@ -898,7 +891,7 @@ class Irc():
|
|||||||
if not self.isOper(uid, allowAuthed=allowAuthed, allowOper=allowOper):
|
if not self.isOper(uid, allowAuthed=allowAuthed, allowOper=allowOper):
|
||||||
log.warning('(%s) Access denied for %s calling %r', self.name,
|
log.warning('(%s) Access denied for %s calling %r', self.name,
|
||||||
self.getHostmask(uid), lastfunc)
|
self.getHostmask(uid), lastfunc)
|
||||||
raise NotAuthenticatedError("You are not authenticated!")
|
raise utils.NotAuthenticatedError("You are not authenticated!")
|
||||||
return True
|
return True
|
||||||
|
|
||||||
class IrcUser():
|
class IrcUser():
|
||||||
|
7
utils.py
7
utils.py
@ -15,6 +15,13 @@ from log import log
|
|||||||
import world
|
import world
|
||||||
import conf
|
import conf
|
||||||
|
|
||||||
|
class NotAuthenticatedError(Exception):
|
||||||
|
"""
|
||||||
|
Exception raised by checkAuthenticated() when a user fails authentication
|
||||||
|
requirements.
|
||||||
|
"""
|
||||||
|
pass
|
||||||
|
|
||||||
class IncrementalUIDGenerator():
|
class IncrementalUIDGenerator():
|
||||||
"""
|
"""
|
||||||
Incremental UID Generator module, adapted from InspIRCd source:
|
Incremental UID Generator module, adapted from InspIRCd source:
|
||||||
|
Loading…
Reference in New Issue
Block a user