756 |
|
} |
757 |
|
} |
758 |
|
|
759 |
– |
/* do_local_user() |
760 |
– |
* |
761 |
– |
* inputs - |
762 |
– |
* output - NONE |
763 |
– |
* side effects - |
764 |
– |
*/ |
765 |
– |
void |
766 |
– |
do_local_user(struct Client *source_p, |
767 |
– |
const char *username, const char *host, const char *server, |
768 |
– |
const char *realname) |
769 |
– |
{ |
770 |
– |
assert(source_p != NULL); |
771 |
– |
assert(source_p->username != username); |
772 |
– |
assert(IsUnknown(source_p)); |
773 |
– |
|
774 |
– |
source_p->localClient->registration &= ~REG_NEED_USER; |
775 |
– |
|
776 |
– |
/* |
777 |
– |
* don't take the clients word for it, ever |
778 |
– |
*/ |
779 |
– |
source_p->servptr = &me; |
780 |
– |
|
781 |
– |
strlcpy(source_p->info, realname, sizeof(source_p->info)); |
782 |
– |
|
783 |
– |
/* stash for later */ |
784 |
– |
strlcpy(source_p->client_host, host, sizeof(source_p->client_host)); |
785 |
– |
strlcpy(source_p->client_server, server, sizeof(source_p->client_server)); |
786 |
– |
|
787 |
– |
if (!IsGotId(source_p)) |
788 |
– |
strlcpy(source_p->username, username, sizeof(source_p->username)); |
789 |
– |
|
790 |
– |
if (!source_p->localClient->registration) |
791 |
– |
register_local_user(source_p); |
792 |
– |
} |
793 |
– |
|
759 |
|
/* change_simple_umode() |
760 |
|
* |
761 |
|
* this callback can be hooked to allow special handling of |