diff options
author | shackspace e.V <shack@shack.(none)> | 2010-05-07 04:50:48 +0200 |
---|---|---|
committer | shackspace e.V <shack@shack.(none)> | 2010-05-07 04:50:48 +0200 |
commit | bd0a3e505cb4384101a4a044fe52a6a1ed4d5e7f (patch) | |
tree | 35439a18e51086da9477b2d4cde066a85701f0b6 /modules | |
parent | 04fa9b3513d909cf71554b01c6c7bd883e964cf4 (diff) |
fixed query not working AT ALL
Diffstat (limited to 'modules')
-rwxr-xr-x | modules/query | 11 |
1 files 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 |