X-Git-Url: http://git.code-monkey.de/?p=multipass-eu.git;a=blobdiff_plain;f=src%2Fmessage_handler.sma;h=1d5927724ea4e2217b3202de6cf880bf32aba015;hp=ff3244093232ac298269402816c72afbb471a474;hb=aa6a8e71d23955a75a0264da7cb02ca15057b0b2;hpb=d1d5f1e8ef58d32533711ddca974d4bd2a31beaa diff --git a/src/message_handler.sma b/src/message_handler.sma index ff32440..1d59277 100644 --- a/src/message_handler.sma +++ b/src/message_handler.sma @@ -1,4 +1,4 @@ -/* $Id: message_handler.sma 1 2005-04-19 09:41:42Z tilman $ */ +/* $Id: message_handler.sma 20 2005-04-29 14:52:24Z tilman $ */ #define MSG_ID_SET_SONGNAME 0 @@ -6,12 +6,15 @@ public message (Msg_Type:type, id, ...) { switch (id) { case MSG_ID_SET_SONGNAME: { - new buf[256], len; + new buf[256], artist[128], title[128], len; - if (type != MSG_STRING) + if (type != MSG_STRING_SET || numargs () < 4) return; - len = snprintf (buf, 256, "%s", getarg (2)); + getsarg (2, artist, 128); + getsarg (3, title, 128); + + len = snprintf (buf, 256, "%s - %s", artist, title); set_songname (buf, len); } }