Hello,
I am developing a module for my IRC network and I can't get some of the code to work.
I have the following:
int os_add_member(User *u)
{
char *nick;
buf = moduleGetLastBuffer();
nick = myStrGetToken(buf, ' ', 0);
privmsg(s_NickServ, "#channel", "%s has been added", nick);
}
However when I run the command I like so:
ADDMEMBER John
I get the following as a privmsg:
<NickOP> pµê has been added
<NickOP> @¹ê has been added
<NickOP> ¼ê has been added
As you can see, it appears to be printing the pointer, rather than the string.
I assume that's why it varies each time I run it.
How do I get it to print the value of nick?
Thank you