changeset 203:28ee3578a6d1

Weather: Add support for usage messages without default prefix.
author Matti Hamalainen <ccr@tnsp.org>
date Wed, 18 Jun 2014 21:02:46 +0300
parents 92f4a489b7ef
children f56c598be862
files weather.tcl
diffstat 1 files changed, 3 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/weather.tcl	Wed Jun 18 20:46:15 2014 +0300
+++ b/weather.tcl	Wed Jun 18 21:02:46 2014 +0300
@@ -102,7 +102,9 @@
   global weather_msg_usage_prefix_1 weather_msg_usage_prefix_2
   set nline 0
   foreach aline [split $amsg "\n"] {
-    if {$nline == 0} {
+    if {[string range $aline 0 1] == ":"} {
+      weather_msg_do $apublic $anick $achan $aline
+    } elseif {$nline == 0} {
       weather_msg_do $apublic $anick $achan "$weather_msg_usage_prefix_1$aline"
     } else {
       weather_msg_do $apublic $anick $achan "$weather_msg_usage_prefix_2$aline"