commit be2c8fa8e08b8b8be90225b78f30943e1f438ed3
parent d2997a4cbddcbe1c9f1c1a44743d0d6d355d5478
Author: Cem Keylan <cem@ckyln.com>
Date: Fri, 8 May 2020 13:54:58 +0300
yaic: use backslashes to send messages starting with a ':'
Diffstat:
1 file changed, 4 insertions(+), 0 deletions(-)
diff --git a/yaic b/yaic
@@ -262,6 +262,10 @@ main() {
:s) toggle NOSERVER ; CHAN="${c:-.}" ; break ;;
:v|:version) msg "${0##*/}-0.1.0" ; continue ;;
:*) msg "${0##*/}: Unknown Command '$msg'" "Type :help to get commands" ; continue ;;
+ '\:'*)
+ # User can send a smiley, or anything starting with
+ # a ':' as a message by adding a backslash.
+ msg=${msg#\\} ;;
/msg) msg="/j ${msg#/msg}" ;;
/names) msg="/names $c" ;;
/q) printf '%s\n' "/q" >> "$infile" ; break ;;