From bd0a3e505cb4384101a4a044fe52a6a1ed4d5e7f Mon Sep 17 00:00:00 2001 From: "shackspace e.V" Date: Fri, 7 May 2010 04:50:48 +0200 Subject: fixed query not working AT ALL --- modules/query | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/modules/query b/modules/query index dd6f415a..ceeff8a5 100755 --- a/modules/query +++ b/modules/query @@ -4,13 +4,16 @@ case "$1" in (--help) echo send a message to a specific user ;; (*) cd /tmp/noise - nick="$1" + . $NOISE_pid/environment + nick="${chat_nick-$NOISE_pid}" + target="$1" shift for client in * ; do . $client/environment - if test "$nick" = "${chat_nick-$client}" ; then - echo "/echo $*" > $client/linefeed - exit + if test "$target" = "${chat_nick-$client}" ; then + echo "/echo <-- $nick: $*" > $client/linefeed + echo "--> $target: $*" + exit fi unset chat_channel -- cgit v1.2.3