aboutsummaryrefslogtreecommitdiffstats
path: root/tbl_qcmd.c
diff options
context:
space:
mode:
authorFreeArtMan <dos21h@gmail.com>2017-03-18 20:30:06 +0000
committerFreeArtMan <dos21h@gmail.com>2017-03-18 20:30:06 +0000
commit0ae9dc3dfe4b1bd24a0d0385480d9ad7d07d0976 (patch)
treef51cbf81033fd9f87373c27c0c81d6b6c59396e9 /tbl_qcmd.c
parent39c0045fbb2f511484d5effb69c987906d0b52d8 (diff)
downloadagni-0ae9dc3dfe4b1bd24a0d0385480d9ad7d07d0976.tar.gz
agni-0ae9dc3dfe4b1bd24a0d0385480d9ad7d07d0976.zip
Basic response from 2 command, works for privatemessages
Diffstat (limited to 'tbl_qcmd.c')
-rw-r--r--tbl_qcmd.c30
1 files changed, 30 insertions, 0 deletions
diff --git a/tbl_qcmd.c b/tbl_qcmd.c
index b3b2a88..4af9de8 100644
--- a/tbl_qcmd.c
+++ b/tbl_qcmd.c
@@ -354,6 +354,35 @@ int tbl_qcmd_add_tok(tble_qcmd *tbl, irc_token *tk)
return 0;
}
+tble_qcmd* tbl_qcmd_match_id(tbl_qcmd *tbl, int idx)
+{
+ int i;
+
+ if (tbl == NULL)
+ {
+ PERM();
+ return NULL;
+ }
+
+ if (idx < 0)
+ {
+ PERM();
+ return NULL;
+ }
+
+ for (i=0;i<tbl->size;i++)
+ {
+ tble_qcmd *iter = tbl->cmd[i];
+
+ if (iter->id == idx)
+ {
+ return iter;
+ }
+ }
+
+ return NULL;
+}
+
int tbl_qcmd_resp(tbl_qcmd *tbl, tble_cmd_resp *resp)
{
int ret = -1;
@@ -492,6 +521,7 @@ int tbl_cmd_resp_print(tble_cmd_resp *resp)
return 0;
}
+//add to print token if its there
int tbl_qcmd_print_cmd(tble_qcmd *tbl, int flags)
{
if (tbl == NULL)