Query Manager

By vSkyzv on Jan 23, 2009

Image

This script condenses multiple query windows into one dialog, it automatically starts when you open mIRC. You can also use the command "/dialog -dm query query" to open it while running mIRC.

*Note: Messages are displayed from recent messages first to old messages last.

Sending Messages
1) There is a menu right under "Nicks:". In that menu, type the name of the person you would like to send a message to.
2) In the editbox on the bottom, type in your message and click "Send".

Replying
In the editbox on the bottom, type in your message and click "Reply". This will send a message to the last nick who messaged you.

The "Add", "Del", and "Lock" Buttons
These buttons are seen next to the menu on the top.

The "Add" button will add a nickname to the menu so you don't have to retype it every time the dialog reopens.

The "Del" button on the other hand will delete the selected nickname.

Lastly, the "Lock" button will prevent you from changing the menu, which is useful so you don't accidentally change it while sending a message. To unlock the menu, click the button again (it will be labeled as "Unlock").

Beeping
This option will send a beep every time somebody sends you a message if the query manager is not the active window.

Server Notices
Notices sent by services, e.g. ChanServ, will be displayed in the query manager.

Colors
Colored, bold, and underlined text will not display properly since regular dialogs do not support them. If anybody would like to fix this, then feel free to.

on *:TEXT:*:?:{
  if ($dialog(query).active == $null) {
    dialog -dm query query
    writeini query.ini settings list $addtok($readini(query.ini,settings,list),<DIV> $+ $nick $+ <DIV>,32) 
    did -r query 2
    didtok query 2 32 $remove(%dialog.active,<DIV>)
  }
  elseif ($dialog(query).active == $false) && ($did(query,10).state == 1) { beep }
  writeini query.ini settings reply $nick
  did -i query 4 1 < $+ $nick $+ > $1-
}
on *:OPEN:?:{ close -m@ $nick }
on *:START:{ dialog -dm query query }
dialog query {
  title "Query Manager"
  size -1 -1 250 330
  text "Nicks:", 1, 10 10 230 15
  combo 2, 10 25 105 1, drop edit
  button "Add", 3, 118 24 40 23
  edit "", 4, 10 60 230 185, multi vsbar
  edit "", 5, 10 280 185 45, multi hsbar
  button "Send", 6, 200 279 40 23
  button "Reply", 7, 200 302 40 23
  button "Del", 8, 159 24 40 23
  button "Lock", 9, 200 24 40 23
  check "Beeping", 10, 15 250 55 15
}
on *:DIALOG:query:*:*:{
  if ($devent == init) {
    didtok query 2 32 $remove($readini(query.ini,settings,list),<DIV>)
    $iif($readini(query.ini,settings,beeping) == 1,did -c $dname 10)
  }
  if ($devent == sclick) {
    if ($did == 3) && ($did($dname,2)) {
      writeini query.ini settings list $addtok($readini(query.ini,settings,list),<DIV> $+ $did($dname,2) $+ <DIV>,32) 
      did -r $dname 2
      didtok $dname 2 32 $remove($readini(query.ini,settings,list),<DIV>)
    }
    if ($did == 6) {
      if (!$did($dname,2) || !$did($dname,5)) { did -i $dname 4 1 [ERROR] $iif(!$did($dname,2),No nick to send text to.,No text to send.) }
      else {
        msg $did($dname,2) $did($dname,5)
        did -i $dname 4 1 * $+ $did($dname,2) $+ * $did($dname,5)
        did -r $dname 5
      }
    }
    if ($did == 7) {
      if (!$did($dname,2) || !$did($dname,5)) { did -i $dname 4 1 [ERROR] $iif(!did($dname,2),No nick to send text to.,No text to send.) }
      else {
        msg $readini(query.ini,settings,reply) $did($dname,5)
        did -i $dname 4 1 * $+ $readini(query.ini,settings,reply) $+ * $did($dname,5)
        did -r $dname 5
      }
    }
    if ($did == 8) {
      writeini query.ini settings list $remove($readini(query.ini,settings,list),<DIV> $+ $did($dname,2) $+ <DIV>)
      did -r $dname 2
      didtok $dname 2 32 $remove($readini(query.ini,settings,list),<DIV>)
    }
    if ($did == 9) {
      if ($did($dname,9) == Lock) { did -b $dname 2 | did -a $dname 9 Unlock }
      else { did -e $dname 2 | did -a $dname 9 Lock }
    }
    if ($did == 10) { $iif($did($dname,10).state == 1,writeini query.ini settings beeping 1,writeini query.ini settings beeping 0) }
  }
}

Comments

Sign in to comment.
Jonesy44   -  Jan 26, 2009

olors
Colored, bold, and underlined text will not display properly since regular dialogs do not support them. If anybody would like to fix this, then feel free to.

Answer: dcx richtext

 Respond  
vSkyzv   -  Jan 25, 2009

Thanks for the reply. I'll be sure to add a way to make communication with services a lot less inconvenient. It gets annoying for me too.

 Respond  
Bluepower10   -  Jan 24, 2009

This works good. Doesn't seem to have any problems. Now I don't have to type /msg chanserv when trying to set channel stuff. Thanks. :)

 Respond  
Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.