mirror of
https://github.com/jlu5/PyLink.git
synced 2024-12-25 20:22:45 +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):
|
||||
pass
|
||||
|
||||
class NotAuthenticatedError(Exception):
|
||||
"""
|
||||
Exception raised by checkAuthenticated() when a user fails authentication
|
||||
requirements.
|
||||
"""
|
||||
pass
|
||||
|
||||
### Internal classes (users, servers, channels)
|
||||
|
||||
class Irc():
|
||||
@ -898,7 +891,7 @@ class Irc():
|
||||
if not self.isOper(uid, allowAuthed=allowAuthed, allowOper=allowOper):
|
||||
log.warning('(%s) Access denied for %s calling %r', self.name,
|
||||
self.getHostmask(uid), lastfunc)
|
||||
raise NotAuthenticatedError("You are not authenticated!")
|
||||
raise utils.NotAuthenticatedError("You are not authenticated!")
|
||||
return True
|
||||
|
||||
class IrcUser():
|
||||
|
7
utils.py
7
utils.py
@ -15,6 +15,13 @@ from log import log
|
||||
import world
|
||||
import conf
|
||||
|
||||
class NotAuthenticatedError(Exception):
|
||||
"""
|
||||
Exception raised by checkAuthenticated() when a user fails authentication
|
||||
requirements.
|
||||
"""
|
||||
pass
|
||||
|
||||
class IncrementalUIDGenerator():
|
||||
"""
|
||||
Incremental UID Generator module, adapted from InspIRCd source:
|
||||
|
Loading…
Reference in New Issue
Block a user