c3b368a68a
If you have a bot connected to the hub, and you want to add a user command to interact with the bot via PM, you need to know its session ID (SID). However, SIDs are assigned when the client first connects, prior to the nickname being sent, and so we cannot just assign a certain SID based on the nickname as part of the connection routine. To overcome this, this commit adds the ability to reserve the first few SIDs (at hub start time, when the SIDs are known) for certain nicknames. The user manager then checks each time a user logs in to see if the nickname matches a reserved one, and if so sets up an alias from the reserved SID to the SID the user was given. This alias is only checked for private messages (the ADC DMSG or EMSG commands) which are routed to the real user. Any other commands are ignored as there should be no need for such aliasing. The list of nicknames to reserve SIDs for is read from a space-separated list in the reserved_sids parameter of the config file. The reserved users must also be registered users (i.e., given a password) -- if they are not, the alias is not set up for them. |
||
---|---|---|
admin | ||
autotest | ||
debian | ||
doc | ||
src | ||
thirdparty | ||
tools | ||
vs2010 | ||
.gitignore | ||
.gitmodules | ||
AUTHORS | ||
BSDmakefile | ||
BUGS | ||
ChangeLog | ||
COPYING | ||
COPYING.OpenSSL | ||
GNUmakefile | ||
README | ||
TODO | ||
version.h |
Welcome and thanks for downloading uHub, a high performance ADC p2p hub. For the official documentation, bugs and other information, please visit: http://www.uhub.org/ For a list of compatible ADC clients, see: http://en.wikipedia.org/wiki/Advanced_Direct_Connect#Client_software