| |
- builtins.Exception(builtins.BaseException)
-
- NotAuthenticatedError
- builtins.object
-
- TS6SIDGenerator
- TS6UIDGenerator
- collections.defaultdict(builtins.dict)
-
- KeyedDefaultdict
class KeyedDefaultdict(collections.defaultdict) |
|
Subclass of defaultdict allowing the key to be passed to the default factory. |
|
- Method resolution order:
- KeyedDefaultdict
- collections.defaultdict
- builtins.dict
- builtins.object
Methods defined here:
- __missing__(self, key)
- __missing__(key) # Called by __getitem__ for missing key; pseudo-code:
if self.default_factory is None: raise KeyError((key,))
self[key] = value = self.default_factory()
return value
Data descriptors defined here:
- __dict__
- dictionary for instance variables (if defined)
- __weakref__
- list of weak references to the object (if defined)
Methods inherited from collections.defaultdict:
- __copy__(...)
- D.copy() -> a shallow copy of D.
- __getattribute__(self, name, /)
- Return getattr(self, name).
- __init__(self, /, *args, **kwargs)
- Initialize self. See help(type(self)) for accurate signature.
- __reduce__(...)
- Return state information for pickling.
- __repr__(self, /)
- Return repr(self).
- copy(...)
- D.copy() -> a shallow copy of D.
Data descriptors inherited from collections.defaultdict:
- default_factory
- Factory for default value called by __missing__().
Methods inherited from builtins.dict:
- __contains__(self, key, /)
- True if D has a key k, else False.
- __delitem__(self, key, /)
- Delete self[key].
- __eq__(self, value, /)
- Return self==value.
- __ge__(self, value, /)
- Return self>=value.
- __getitem__(...)
- x.__getitem__(y) <==> x[y]
- __gt__(self, value, /)
- Return self>value.
- __iter__(self, /)
- Implement iter(self).
- __le__(self, value, /)
- Return self<=value.
- __len__(self, /)
- Return len(self).
- __lt__(self, value, /)
- Return self<value.
- __ne__(self, value, /)
- Return self!=value.
- __new__(*args, **kwargs) from builtins.type
- Create and return a new object. See help(type) for accurate signature.
- __setitem__(self, key, value, /)
- Set self[key] to value.
- __sizeof__(...)
- D.__sizeof__() -> size of D in memory, in bytes
- clear(...)
- D.clear() -> None. Remove all items from D.
- fromkeys(iterable, value=None, /) from builtins.type
- Returns a new dict with keys from iterable and values equal to value.
- get(...)
- D.get(k[,d]) -> D[k] if k in D, else d. d defaults to None.
- items(...)
- D.items() -> a set-like object providing a view on D's items
- keys(...)
- D.keys() -> a set-like object providing a view on D's keys
- pop(...)
- D.pop(k[,d]) -> v, remove specified key and return the corresponding value.
If key is not found, d is returned if given, otherwise KeyError is raised
- popitem(...)
- D.popitem() -> (k, v), remove and return some (key, value) pair as a
2-tuple; but raise KeyError if D is empty.
- setdefault(...)
- D.setdefault(k[,d]) -> D.get(k,d), also set D[k]=d if k not in D
- update(...)
- D.update([E, ]**F) -> None. Update D from dict/iterable E and F.
If E is present and has a .keys() method, then does: for k in E: D[k] = E[k]
If E is present and lacks a .keys() method, then does: for k, v in E: D[k] = v
In either case, this is followed by: for k in F: D[k] = F[k]
- values(...)
- D.values() -> an object providing a view on D's values
Data and other attributes inherited from builtins.dict:
- __hash__ = None
|
class NotAuthenticatedError(builtins.Exception) |
|
Exception raised by checkAuthenticated() when a user fails authentication
requirements. |
|
- Method resolution order:
- NotAuthenticatedError
- builtins.Exception
- builtins.BaseException
- builtins.object
Data descriptors defined here:
- __weakref__
- list of weak references to the object (if defined)
Methods inherited from builtins.Exception:
- __init__(self, /, *args, **kwargs)
- Initialize self. See help(type(self)) for accurate signature.
- __new__(*args, **kwargs) from builtins.type
- Create and return a new object. See help(type) for accurate signature.
Methods inherited from builtins.BaseException:
- __delattr__(self, name, /)
- Implement delattr(self, name).
- __getattribute__(self, name, /)
- Return getattr(self, name).
- __reduce__(...)
- helper for pickle
- __repr__(self, /)
- Return repr(self).
- __setattr__(self, name, value, /)
- Implement setattr(self, name, value).
- __setstate__(...)
- __str__(self, /)
- Return str(self).
- with_traceback(...)
- Exception.with_traceback(tb) --
set self.__traceback__ to tb and return self.
Data descriptors inherited from builtins.BaseException:
- __cause__
- exception cause
- __context__
- exception context
- __dict__
- __suppress_context__
- __traceback__
- args
|
class TS6SIDGenerator(builtins.object) |
|
TS6 SID Generator. <query> is a 3 character string with any combination of
uppercase letters, digits, and #'s. it must contain at least one #,
which are used by the generator as a wildcard. On every next_sid() call,
the first available wildcard character (from the right) will be
incremented to generate the next SID.
When there are no more available SIDs left (SIDs are not reused, only
incremented), RuntimeError is raised.
Example queries:
"1#A" would give: 10A, 11A, 12A ... 19A, 1AA, 1BA ... 1ZA (36 total results)
"#BQ" would give: 0BQ, 1BQ, 2BQ ... 9BQ (10 total results)
"6##" would give: 600, 601, 602, ... 60Y, 60Z, 610, 611, ... 6ZZ (1296 total results) |
|
Methods defined here:
- __init__(self, irc)
- Initialize self. See help(type(self)) for accurate signature.
- increment(self, pos=2)
- Increments the SID generator to the next available SID.
- next_sid(self)
- Returns the next unused TS6 SID for the server.
Data descriptors defined here:
- __dict__
- dictionary for instance variables (if defined)
- __weakref__
- list of weak references to the object (if defined)
|
class TS6UIDGenerator(builtins.object) |
|
TS6 UID Generator module, adapted from InspIRCd source:
https://github.com/inspircd/inspircd/blob/f449c6b296ab/src/server.cpp#L85-L156 |
|
Methods defined here:
- __init__(self, sid)
- Initialize self. See help(type(self)) for accurate signature.
- increment(self, pos=5)
- Increments the SID generator to the next available SID.
- next_uid(self)
- Returns the next unused TS6 UID for the server.
Data descriptors defined here:
- __dict__
- dictionary for instance variables (if defined)
- __weakref__
- list of weak references to the object (if defined)
| |