Typo's Multi Messenger lets you easily manage a list of Users and Channels so that you can message all of them at once.
There are two sections seperated by tabs. They are the User Section and the Channel Section. Each section works identically. There is an edit box for your message and a send button to send it to all the Users or Channels in your list depending on which tab your in.
There is also an Add button with an edit box to add Users or Channels depending on which tab your in and a Remove Selected User or Remove Selected Channel button to remove the User or Channel that you clicked on in the list depending on which tab your in.
You can also add and remove Channels by right clicking in the desired channel and selecting either Add or Remove from the Typo's Multi Messenger menu. You can also add or remove users by right clicking on their name in a nicklist or in a PM window and selecting Add or Remove from the Typo's Multi Messenger menu.
The script also works just as well with command lines if you dont like dialogs or just prefer typing.
/umsg Your message here. --- Sends a message to all the users in your Users list.
/cmsg Your message here. --- Sends a message to all the users in your Channels list.
/AddMultiChannel #channel --- Add a Channel to your Channels list.
/DeleteMultiChannel #Channel --- Remove a Channel from your Channels list.
/AddMultiUser Name --- Add a Channel to your Users list.
/DeleteMultiUser Name --- Remove a Channel from your Userss list.
The parameters are optional in all those commands. If you type the command by itself you will be prompted for the appropriate input (Message, Name or Channel)
You can also manually add and remove channels from the list with the /AddCmsg or /RemoveCmsg commands followed by the channel name.
Enjoy
Edited Added .write MultiUserList.txt and .write MultiChannelList.txt to the on load and on start to avoid checks to see if the files exists. .write filename alone will add nothing to a file that exists but will create the file if it doesn't while still adding nothing to it.
;Begin Typo's Multi Messenger
on *:load:{
.write MultiUserList.txt
.write MultiChannelList.txt
.hmake MultiChannelList 20
.hmake MultiUserList 20
}
on *:start:{
.write MultiUserList.txt
.write MultiChannelList.txt
.hmake MultiChannelList 20
.hload MultiChannelList MultiChannelList.txt
.hmake MultiUserList 20
.hload MultiUserList MultiUserList.txt
}
menu status {
-
<[Typo's Multi Messenger]>
.Multi Messenger Control Panel:$iif($dialog(MultiMessenger) == $null,dialog -md MultiMessenger MultiMessenger,dialog -ev MultiMessenger MultiMessenger)
}
menu nicklist,query {
<[Typo's Multi Messenger]>
.Multi Messenger Control Panel:$iif($dialog(MultiMessenger) == $null,dialog -md MultiMessenger MultiMessenger,dialog -ev MultiMessenger MultiMessenger)
.$iif($hfind(MultiUserList,$1,1) == $1,$style(2)) Add $1:AddMultiUser $1
.$iif($hfind(MultiUserList,$1,1) != $1,$style(2)) Remove $1:DeleteMultiUser $1
}
menu channel {
<[Typo's Multi Messenger]>
.Multi Messenger Control Panel:$iif($dialog(MultiMessenger) == $null,dialog -md MultiMessenger MultiMessenger,dialog -ev MultiMessenger MultiMessenger)
.$iif($hfind(MultiChannelList,$chan,1) == $chan,$style(2)) Add $chan:AddMultiChannel $chan
.$iif($hfind(MultiChannelList,$chan,1) != $chan,$style(2)) Remove $chan:DeleteMultiChannel $chan
}
alias Cmsg {
if ($1 == $null) { var %tempmessage = $$?="Enter the message you wish to send to all the Channels in your list." }
else { var %tempmessage = $1- }
var %c = $hget(MultiChannelList,0).item
while (%c > 0) {
if ($chan($hget(MultiChannelList,%c).item) != $null) { .msg $hget(MultiChannelList,%c).item %tempmessage }
dec %c
}
}
alias Umsg {
if ($1 == $null) { var %tempmessage = $$?="Enter the message you wish to send to all the Users in your list." }
else { var %tempmessage = $1- }
var %u = $hget(MultiUserList,0).item
while (%u > 0) {
if ($address($hget(MultiUserList,%u).item,1) != $null) { .msg $hget(MultiUserList,%u).item %tempmessage }
dec %u
}
}
alias AddMultiChannel {
if ($chan == $null) && ($1 == $null) { var %tempchan = #$$?="Please enter the channel to add." }
elseif ($chan == $null) { var %tempchan = $1 }
else { var %tempchan = $chan }
if ($left(%tempchan,1) != $chr(35)) || ($len(%tempchan) !> 1) { echo -a That is not a valid channel name. }
elseif ($hfind(MultiChannelList,%tempchan,1) == %tempchan) { echo -a That channel has already been added to your Channel list. }
else {
hadd -m MultiChannelList %tempchan %tempchan
hsave MultiChannelList MultiChannelList.txt
if ($dialog(MultiMessenger) != $null) { .timer 1 0 refreshchandialog }
echo -a You have added %tempchan to your Channel list.
}
}
alias DeleteMultiChannel {
if ($chan == $null) && ($1 == $null) { var %tempchan = #$$?="Please enter the channel to be removed." }
elseif ($chan == $null) { var %tempchan = $1 }
else { var %tempchan $chan }
if ($left(%tempchan,1) != $chr(35)) || ($len(%tempchan) !> 1) { echo -a That is not a valid channel name. }
elseif ($hfind(MultiChannelList,%tempchan,1) != %tempchan) { echo -a That channel is not in your Channel list. }
else {
hdel MultiChannelList %tempchan
hsave MultiChannelList MultiChannelList.txt
if ($dialog(MultiMessenger) != $null) { .timer 1 0 refreshchandialog }
echo -a You have removed %tempchan from your Channel list.
}
}
alias AddMultiUser {
if ($1 == $null) { var %tempuser = $$?="Please enter the User to be add." }
else { var %tempuser = $1 }
if ($hfind(MultiUserList,%tempuser,1) == %tempuser) { echo -a That name has already been added to your User list. }
else {
hadd -m MultiUserList %tempuser %tempuser
hsave MultiUserList MultiUserList.txt
if ($dialog(MultiMessenger) != $null) { .timer 1 0 refreshuserdialog }
echo -a %tempuser has been added to your User list.
}
}
alias DeleteMultiUser {
if ($1 == $null) { var %tempuser = $$?="Please enter the User to be removed." }
else { var %tempuser = $1 }
if ($hfind(MultiUserList,%tempuser,1) == $null) { echo -a That name is not in your User list. }
else {
hdel MultiUserList %tempuser
hsave MultiUserList MultiUserList.txt
if ($dialog(MultiMessenger) != $null) { .timer 1 0 refreshuserdialog }
echo -a %tempuser has been removed from your User list!
}
}
alias refreshchandialog {
var %cc = $hget(MultiChannelList,0).item
did -r MultiMessenger 13
while (%cc > 0) {
did -a MultiMessenger 13 $hget(MultiChannelList,%cc).item
dec %cc
}
}
alias refreshuserdialog {
var %uc = $hget(MultiUserList,0).item
did -r MultiMessenger 2
while (%uc > 0) {
did -a MultiMessenger 2 $hget(MultiUserList,%uc).item
dec %uc
}
}
dialog MultiMessenger {
title "Typo's Multi Messenger"
size -1 -1 85 143
option dbu
button "Done", 1, 29 130 25 10, default ok cancel
tab "Users Tab", 10, 0 -2 84 144
list 2, 30 63 52 64, tab 10 sort size vsbar
button "Delete", 5, 4 116 24 10, tab 10
edit "", 3, 30 49 52 13, tab 10 autohs
button "Add", 4, 3 51 25 10, tab 10
text "Add or Delete Users.", 9, 4 40 76 8, tab 10 center
button "Send", 6, 3 25 25 10, tab 10
edit "", 7, 30 23 52 13, tab 10 autohs
text "Send a message to all Users.", 8, 4 14 76 8, tab 10 center
tab "Channels Tab", 11
edit "", 12, 30 49 52 13, tab 11 autohs
list 13, 30 63 52 64, tab 11 sort size vsbar
button "Delete", 14, 4 116 24 10, tab 11
button "Add", 15, 3 51 25 10, tab 11
text "Add or Delete Channels.", 16, 4 40 76 8, tab 11 center
button "Send", 17, 3 25 25 10, tab 11
edit "", 18, 30 23 52 13, tab 11 autohs
text "Send a message to all Channels.", 19, 3 14 78 8, tab 11 center
box "", 21, 1 35 82 94
box "", 20, 1 9 82 28
text "Press 'Delete' to remove the selected item.", 22, 4 71 24 40, center
}
on *:dialog:MultiMessenger:init:0:{
refreshchandialog
refreshuserdialog
did -a MultiMessenger 12 $chr(35)
}
on *:dialog:MultiMessenger:sclick:6:{
if ($did(7) != $null) {
umsg $did(7)
did -r MultiMessenger 7
}
}
on *:dialog:MultiMessenger:sclick:17:{
if ($did(18) != $null) {
cmsg $did(18)
did -r MultiMessenger 18
}
}
on *:dialog:MultiMessenger:sclick:4:{
AddMultiUser $did(3)
did -r MultiMessenger 3
}
on *:dialog:MultiMessenger:sclick:5:{
DeleteMultiUser $did(2).seltext
did -r MultiMessenger 2
}
on *:dialog:MultiMessenger:sclick:15:{
AddMultiChannel $did(12)
did -r MultiMessenger 12
did -a MultiMessenger 12 $chr(35)
}
on *:dialog:MultiMessenger:sclick:14:{
DeleteMultiChannel $did(13).seltext
did -r MultiMessenger 13
}
on *:unload:{
.hsave MultiChannelList MultiChannelList.txt
.hsave MultiUserList MultiUserList.txt
.hfree multichannellist
.hfree multiuserlist
}
on *:exit:{
.hsave MultiChannelList MultiChannelList.txt
.hsave MultiUserList MultiUserList.txt
}
;End Typo's Multi Messenger
Typo: I used the below as you stated and got \"false true\" not the double true you said I would.
//echo -a $iif(1 !<= 0,true,false) $iif(1 > 0,true,false)
Edit: I would also like to note I have not rated it so any change to the score , up or down , is not my doing. When I rate I will note doing so in a post.
First off I cannot seem to recreate the problem where the channels won\'t add properly but I\'ll make sure my code matches the uploaded code and double/triple check for errors and I have updated this so please make sure your code matches mine as well.
Also and once again. No matter what you tell me or how many times you type it changing !<= to > is sily. They are the same exact thing. Don\'t believe me then type the following command:
//echo -a $iif(1 !<= 0,true,false) $iif(1 > 0,true,false)
It will return true two times because \"!>=\" == \"<\".
Nothing you type to me will change the fact that saying \"is not less than or equal to\" is the same as \"more than\".
Edited Code now updated with the changing of \"!<=\" to \">\"
I had to change \" while (%cc !<= 0) { \" and \" while (%uc !<= 0) { \" to be \" while (%cc > 0) { \" and while (%uc > 0) { \" again as I stated in the first version post it hung up otherwise.
I tried to enter a channel \" #CR&A \" and it kept tellng me \" That is not a valid channel name. \" when it is a channel I am in.
Using the \"Add #dfstrategy \" via the popup command give the same result \" That is not a valid channel name. \" which is a channel a channel I am also in.
To make the above work ( the popup to add / remove the channels ) I had to change your \" ($len(%tempchan) !> 1) \" to be \" ($len(%tempchan) < 1) \" in the two alias for that section. It appears to me that the use of a \" ! \" in combination with > , < just does not seem to work for me.
Ok, I don\'t think Im going to slim down the dialog because of the wording on tab 2 would have to be shortened to fit and I personally don\'t think it\'s too big but if I get similar comments I will prolly go ahead and do it. I will add the auto # in the channel edit field now and I thought I had already silenced the /msg commands so I\'ll do that too.
Be updated in a few minutes.
Actually, Ill try the slim down too....and while Im at it I dont like the size of the remove button so I\'m going to do something about that too.