forked from ValwareIRC/mIRC-Scripts
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Whisper This script adds a `/WHISPER` command, allowing you to whisper to someone in a channel. The server MUST support `draft/channel-context` in order for this to work. The channel MUST be the active window when using `/WHISPER`
- Loading branch information
1 parent
de0bacc
commit 4664804
Showing
1 changed file
with
32 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
; Licence: GPLv3 or later | ||
; Copyright Ⓒ 2022 Valerie Pond | ||
; This is just a small script which lets you use /WHISPER <nick> <message> | ||
; It sends a message to the specified nick using the channel as a context | ||
; allowing you to essentially whisper to someone in the channel. | ||
; | ||
; The server MUST support `draft/channel-context` in order for this to work. | ||
; The channel MUST be the active window when using /WHISPER | ||
|
||
alias whisper { | ||
%nick = $1 | ||
%msg = $2- | ||
%chan = $active | ||
if (%chan !ischan) { | ||
echo -at You are not on a channel | ||
return | ||
} | ||
if ($left(%nick,1) == $chr(35)) { | ||
echo -at * You cannot whisper to a channel | ||
return | ||
} | ||
if (%nick !ison %chan) || ($me !ison %chan) { | ||
echo -at * You do not share that channel | ||
return | ||
} | ||
.raw @+draft/channel-context= $+ %chan NOTICE %nick : $+ %msg | ||
echo -t %chan [Whisper to %nick $+ ] %msg | ||
} | ||
|
||
on *:NOTICE:*:?:{ | ||
if ($msgtags(+draft/channel-context).key !== $null) echo -t $msgtags(+draft/channel-context).key [Whisper from $nick $+ ] $1- | ||
} |