aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/commands.c19
-rw-r--r--src/fujichat.atrbin92176 -> 92176 bytes
-rw-r--r--src/fujitest.atrbin92176 -> 92176 bytes
3 files changed, 16 insertions, 3 deletions
diff --git a/src/commands.c b/src/commands.c
index c44697d..dc9aec6 100644
--- a/src/commands.c
+++ b/src/commands.c
@@ -16,6 +16,7 @@ void cmd_ping(void);
void cmd_quit(void);
void cmd_quote(void);
void cmd_ver(void);
+void cmd_version(void);
void do_me(void);
#ifdef FEAT_COLOR_COMMAND
void cmd_fgcolor(void);
@@ -27,13 +28,13 @@ fuji_cmd_t cmd_list[] = {
{ "J", ARGTYPE_OPT, cmd_join },
{ "MSG", ARGTYPE_REQUIRED, cmd_msg },
{ "M", ARGTYPE_REQUIRED, cmd_msg },
- { "NICK", ARGTYPE_REQUIRED, cmd_nick },
+ { "NICK", ARGTYPE_OPT, cmd_nick },
{ "PART", ARGTYPE_NONE, cmd_part },
{ "PING", ARGTYPE_REQUIRED, cmd_ping },
{ "QUIT", ARGTYPE_OPT, cmd_quit },
{ "QUOTE", ARGTYPE_REQUIRED, cmd_quote },
- { "VER", ARGTYPE_REQUIRED, cmd_ver },
- { "VERSION", ARGTYPE_REQUIRED, cmd_ver },
+ { "VER", ARGTYPE_OPT, cmd_version },
+ { "VERSION", ARGTYPE_OPT, cmd_version },
{ "ME", ARGTYPE_REQUIRED, do_me },
#ifdef FEAT_COLOR_COMMAND
{ "FGCOLOR", ARGTYPE_REQUIRED, cmd_fgcolor },
@@ -75,6 +76,13 @@ void cmd_ver(void) {
send_serv_msg_buf();
}
+void cmd_version(void) {
+ if(cmd_arg)
+ cmd_ver();
+ else
+ send_server_cmd("VERSION", NULL);
+}
+
void cmd_ping(void) {
serv_msg_buf_len = sprintf(serv_msg_buf, "PRIVMSG %s :%cPING %03d %03d %03d%c%c",
cmd_arg, 1, PEEK(20), PEEK(19), PEEK(18), 1, NL);
@@ -117,6 +125,11 @@ void cmd_quote(void) {
}
void cmd_nick(void) {
+ if(!cmd_arg) {
+ printf("> You are known as %s\n", config->nick);
+ return;
+ }
+
strcpy(config->nick, cmd_arg);
send_server_cmd("NICK", cmd_arg);
printf("> You are now known as %s\n", config->nick);
diff --git a/src/fujichat.atr b/src/fujichat.atr
index d28adfb..92ec181 100644
--- a/src/fujichat.atr
+++ b/src/fujichat.atr
Binary files differ
diff --git a/src/fujitest.atr b/src/fujitest.atr
index a431923..35fc257 100644
--- a/src/fujitest.atr
+++ b/src/fujitest.atr
Binary files differ