From fcfc709333fbf8ae6887d935927c388063c03813 Mon Sep 17 00:00:00 2001 From: Luke Bratch Date: Fri, 29 Oct 2010 01:59:09 +0100 Subject: Make name to number lookups set the correct offset --- blasms.c | 3 ++- blasms.conf | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/blasms.c b/blasms.c index 9cbd8c4..578c803 100644 --- a/blasms.c +++ b/blasms.c @@ -97,11 +97,12 @@ void settelnum(char* telnum, char* sms, int *offsetptr) { //printf("Name match: %s\n", line); strxfrm(telnum, line, offset); telnum[offset] = '\0'; + break; } } } - *offsetptr = offset; + *offsetptr = *offsetptr + strlen(name) + 1; } int main(int argc, char *argv[]) { diff --git a/blasms.conf b/blasms.conf index 5c9752e..09d2991 100644 --- a/blasms.conf +++ b/blasms.conf @@ -1,3 +1,4 @@ default ssh ircscreen@tghost.co.uk "echo \"msg #theblueroom SMS from %N: %s\" > ~/.irssi/remote-control" TBR ssh ircscreen@tghost.co.uk "echo \"msg #theblueroom SMS from %N: %s\" > ~/.irssi/remote-control" WEB echo Fake posting to tghost.co.uk: %s +!sms echo "%P <%d> %s" -- cgit v1.2.3