small changes, bigger simplifications are on its way
This commit is contained in:
parent
a63ccb4600
commit
2e945e48fb
@ -1,5 +1,5 @@
|
|||||||
# sic version
|
# sic version
|
||||||
VERSION = 0.8
|
VERSION = 0.9
|
||||||
|
|
||||||
# Customize below to fit your system
|
# Customize below to fit your system
|
||||||
|
|
||||||
|
10
sic.1
10
sic.1
@ -36,19 +36,19 @@ Specify the real name (default is $USER)
|
|||||||
Prints version information to standard output, then exits.
|
Prints version information to standard output, then exits.
|
||||||
.SH COMMANDS
|
.SH COMMANDS
|
||||||
.TP
|
.TP
|
||||||
.B /j #channel
|
.B :j #channel
|
||||||
Join a channel
|
Join a channel
|
||||||
.TP
|
.TP
|
||||||
.B /l #channel
|
.B :l #channel
|
||||||
Leave a channel
|
Leave a channel
|
||||||
.TP
|
.TP
|
||||||
.B /m #channel/user msg
|
.B :m #channel/user msg
|
||||||
Write a message to #channel/user
|
Write a message to #channel/user
|
||||||
.TP
|
.TP
|
||||||
.B /s #channel/user
|
.B :s #channel/user
|
||||||
Set default channel/user
|
Set default channel/user
|
||||||
.TP
|
.TP
|
||||||
.B /t topic
|
.B :t #channel topic
|
||||||
Set the channel topic
|
Set the channel topic
|
||||||
.TP
|
.TP
|
||||||
Everything which is not a command will simply be posted into the channel or to
|
Everything which is not a command will simply be posted into the channel or to
|
||||||
|
6
sic.c
6
sic.c
@ -67,14 +67,14 @@ parsein(char *msg) {
|
|||||||
|
|
||||||
if(msg[0] == 0)
|
if(msg[0] == 0)
|
||||||
return;
|
return;
|
||||||
if(msg[0] != '/') {
|
if(msg[0] != ':') {
|
||||||
privmsg(channel, msg);
|
privmsg(channel, msg);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if(!strncmp(msg + 1, "j ", 2) && (msg[3] == '#'))
|
if(!strncmp(msg + 1, "j ", 2) && (msg[3] == '#'))
|
||||||
snprintf(bufout, sizeof bufout, "JOIN %s\r\n", &msg[3]);
|
snprintf(bufout, sizeof bufout, "JOIN %s\r\n", &msg[3]);
|
||||||
else if(!strncmp(msg + 1, "l ", 2))
|
else if(!strncmp(msg + 1, "l ", 2))
|
||||||
snprintf(bufout, sizeof bufout, "PART %s :sic\r\n", &msg[3]);
|
snprintf(bufout, sizeof bufout, "PART %s :sic - 300 LOC are too much!\r\n", &msg[3]);
|
||||||
else if(!strncmp(msg + 1, "m ", 2)) {
|
else if(!strncmp(msg + 1, "m ", 2)) {
|
||||||
if((p = strchr(&msg[3], ' ')))
|
if((p = strchr(&msg[3], ' ')))
|
||||||
*(p++) = 0;
|
*(p++) = 0;
|
||||||
@ -127,10 +127,8 @@ parsesrv(char *msg) {
|
|||||||
|
|
||||||
if(!msg || !(*msg))
|
if(!msg || !(*msg))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
for(i = 0; i < Tlast; i++)
|
for(i = 0; i < Tlast; i++)
|
||||||
argv[i] = NULL;
|
argv[i] = NULL;
|
||||||
|
|
||||||
/* <bufout> ::= [':' <prefix> <SPACE> ] <command> <params> <crlf>
|
/* <bufout> ::= [':' <prefix> <SPACE> ] <command> <params> <crlf>
|
||||||
* <prefix> ::= <servername> | <nick> [ '!' <user> ] [ '@' <server> ]
|
* <prefix> ::= <servername> | <nick> [ '!' <user> ] [ '@' <server> ]
|
||||||
* <command> ::= <letter> { <letter> } | <number> <number> <number>
|
* <command> ::= <letter> { <letter> } | <number> <number> <number>
|
||||||
|
Loading…
Reference in New Issue
Block a user