diff options
author | Timo Sirainen <cras@irssi.org> | 2000-06-17 15:58:40 +0000 |
---|---|---|
committer | cras <cras@dbcabf3a-b0e7-0310-adc4-f8d773084564> | 2000-06-17 15:58:40 +0000 |
commit | 8fa6ca5e61a19e65f0b35c20a332b45e7dfce1a1 (patch) | |
tree | 06464f45935df048cfbbd09b2c1e4086b3f2b183 /src/core | |
parent | f0d6ef99dcfdb92230d6ab63c69f5baf6510f867 (diff) | |
download | irssi-8fa6ca5e61a19e65f0b35c20a332b45e7dfce1a1.zip |
File name completion for /DCC SEND
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@361 dbcabf3a-b0e7-0310-adc4-f8d773084564
Diffstat (limited to 'src/core')
-rw-r--r-- | src/core/commands.c | 15 | ||||
-rw-r--r-- | src/core/commands.h | 2 |
2 files changed, 17 insertions, 0 deletions
diff --git a/src/core/commands.c b/src/core/commands.c index 1b17ac4b..225f8213 100644 --- a/src/core/commands.c +++ b/src/core/commands.c @@ -115,6 +115,21 @@ void command_runsub(const char *cmd, const char *data, void *p1, void *p2) g_free(subcmd); } +COMMAND_REC *command_find(const char *command) +{ + GSList *tmp; + int len; + + for (tmp = commands; tmp != NULL; tmp = tmp->next) { + COMMAND_REC *rec = tmp->data; + + if (g_strcasecmp(rec->cmd, command) == 0) + return rec; + } + + return NULL; +} + char *cmd_get_param(char **data) { char *pos; diff --git a/src/core/commands.h b/src/core/commands.h index 74f66e45..42fb20c0 100644 --- a/src/core/commands.h +++ b/src/core/commands.h @@ -34,6 +34,8 @@ void command_unbind(const char *cmd, SIGNAL_FUNC func); void command_runsub(const char *cmd, const char *data, void *p1, void *p2); +COMMAND_REC *command_find(const char *command); + /* count can have these flags: */ #define PARAM_WITHOUT_FLAGS(a) ((a) & 0x00ffffff) /* don't check for quotes - "arg1 arg2" is NOT treated as one argument */ |