Channel implementation in demo.
This commit is contained in:
parent
909a5ff740
commit
922f66969b
15
demo/main.c
15
demo/main.c
@ -69,6 +69,21 @@ int main(int argc, char *argv[]) {
|
|||||||
statistics.incoming,
|
statistics.incoming,
|
||||||
statistics.total);
|
statistics.total);
|
||||||
}
|
}
|
||||||
|
else if(strstr(in, "/join") == in)
|
||||||
|
{
|
||||||
|
const char *chan = strchr(in, '#');
|
||||||
|
if(!chan)
|
||||||
|
puts("No channel name detected. Channel names start with `#'.");
|
||||||
|
NeoComm_join_channel(chan);
|
||||||
|
}
|
||||||
|
else if(strstr(in, "/leave") == in)
|
||||||
|
{
|
||||||
|
const char *chan = strchr(in, '#');
|
||||||
|
if(!chan)
|
||||||
|
puts("No channel name detected. Channel names start with `#'.");
|
||||||
|
if(!NeoComm_leave_channel(chan))
|
||||||
|
printf("%s\n", NeoComm_get_last_error());
|
||||||
|
}
|
||||||
else if(strcmp(in, "/help") == 0)
|
else if(strcmp(in, "/help") == 0)
|
||||||
print_help();
|
print_help();
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user