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.
- Loading branch information
1 parent
bdc1b29
commit b7583c6
Showing
1 changed file
with
35 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,35 @@ | ||
# This is a script which allows you to see and send the IRCv3 proposed `display-name` message-tag | ||
# You can set your display name by typing /displayname WeeWoo | ||
# Must be connected to a server which supports message-tags, or if unrealircd, you'll need to load my module: | ||
# https://github.com/ValwareIRC/valware-unrealircd-mods/tree/main/display-name | ||
|
||
on ^*:TEXT:*:*:{ | ||
%display = $msgtags(+draft/display-name).key | ||
if (!%display) return | ||
echo -tc normal $chan < $+ %display ( $+ $nick $+ ) $+ > $1- | ||
window -g1 $target | ||
halt | ||
} | ||
|
||
|
||
on ^*:ACTION:*:*:{ | ||
%display = $msgtags(+draft/display-name).key | ||
%rep = \s | ||
%repl = $chr(32) | ||
%display = $replace(%display,%rep,%repl) | ||
if (!%display) return | ||
echo -tc action $target * %display ( $+ $nick $+ ) $1- | ||
window -g1 $target | ||
halt | ||
} | ||
|
||
on *:PARSELINE:out:*:{ | ||
tokenize 32 $parseline | ||
if (%displayname == $null) return | ||
if ($left($1,1) == @) && (display-name !isin $1) { | ||
.parseline -ot $1 $+ ;+draft/display-name= $+ %displayname $2- | ||
} | ||
} | ||
|
||
on *:LOAD:set %displayname $$?="What display name would you like?" | ||
alias displayname set %displayname $1- |