Skip to content

Commit

Permalink
Add setname capability
Browse files Browse the repository at this point in the history
  • Loading branch information
vanosg committed Jun 2, 2020
1 parent c6b22b9 commit 063d6d6
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/mod/server.mod/servmsg.c
Expand Up @@ -1283,6 +1283,13 @@ static int got396(char *from, char *msg)
return 0;
}

static int gotsetname(char *from, char *msg)
{
fixcolon(msg);
strncpy(botrealname, msg, sizeof botrealname);
return 0;
}

static int tryauthenticate(char *from, char *msg)
{
char src[(sizeof sasl_username) + (sizeof sasl_username) +
Expand Down Expand Up @@ -1741,6 +1748,7 @@ static cmd_t my_raw_binds[] = {
{"CAP", "", (IntFunc) gotcap, NULL},
{"AUTHENTICATE", "", (IntFunc) gotauthenticate, NULL},
{"CHGHOST", "", (IntFunc) gotchghost, NULL},
{"SETNAME", "", (IntFunc) gotsetname, NULL},
{NULL, NULL, NULL, NULL}
};

Expand Down

2 comments on commit 063d6d6

@vanosg
Copy link
Member Author

@vanosg vanosg commented on 063d6d6 Jun 6, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi, @grumpy-creator, thanks so much for the catch! It's great to have extra sets of eyes. If you're ever bored, stop by #eggdrop and say hi. I hope you continue to involve yourself in the project.

@thommey
Copy link
Member

@thommey thommey commented on 063d6d6 Jun 6, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed by 05546b9, thank you.

Please sign in to comment.