Max's Topic Manager

By MaxEvans on Jan 21, 2012

This is my newest dialog I've been working on. It's basically a topic manager to help manage topics. You can set a topic straight from the dialog, and it automatically writes it to a text file which displays in the dialog. You can even select a past topic and set the topic back as the selected topic.

When you first start using it, click on Manage Channels and add the channels you want to set and manage topics for. Then after closing the channel manager dialog, select the channel you want to set the topic for from the drop down box. Then write a topic and click set topic. And voila! You can do the same for past topics, just select a past topic, making sure the channel you want to set the topic to is selected, then click set selected topic. You can even delete past topics you don't want to keep by selecting the topic you want to delete then clicking delete selected topic.

Edit: I added a button to open the text file that stores your past topics, so you can edit past topics if you forgot something, that way you don't have to delete it and retype it.

Main Dialog:
Image

Channel Manager Dialog:
Image

;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~;
;       Max's Topic Manager     ;
;         By: Max Evans         ;
;       irc.geekshed.net        ;
;   #GeekUnderground & #Chris   ;
;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~;

dialog Topic {
  title "Max's Topic Manager v1"
  size -1 -1 248 168
  option dbu
  edit "", 1, 74 12 163 10, autohs
  box "Set Topic", 2, 4 1 241 28
  list 3, 11 55 227 75, sort size extsel hsbar vsbar
  box "Past Topics", 4, 4 45 241 105
  button "Close", 6, 111 153 32 11, ok
  combo 7, 10 12 61 50, size drop
  button "Manage Channels", 8, 14 33 52 11
  button "Set Topic", 9, 201 33 31 11
  button "Set Selected Topic", 5, 59 134 58 11
  button "Delete Selected Topic", 10, 131 134 58 11
  button "Open Topics File", 11, 96 33 58 11
}

dialog TMChan {
  title "Channel Manager"
  size -1 -1 84 112
  option dbu
  list 1, 13 13 58 55, size
  box "Topic Manager Channels", 2, 8 3 69 86
  button "Add", 3, 14 72 26 11
  button "Delete", 4, 45 72 26 11
  button "Close", 5, 29 95 30 9, ok
}

on *:Dialog:Topic:init:*: {
  $iif($isfile(Topics.txt),loadbuf -o Topic 3 Topics.txt)
  $iif($isfile(TMChannels.txt),loadbuf -o Topic 7 TMChannels.txt)
}

on *:Dialog:TMChan:init:*: {
  $iif($isfile(TMChannels.txt),loadbuf -o TMChan 1 TMChannels.txt)
}

on *:Dialog:Topic:sclick:*: {
  if ($did == 5) { /chanserv topic $did(7).seltext $did(3).seltext }
  if ($did == 8) { dialog -m TMChan TMChan }
  if ($did == 9) { /cs topic $did(7).seltext $did(1) | write Topics.txt $did(1) | did -r Topic 3 | loadbuf -o Topic 3 Topics.txt | did -r Topic 1 }
  if ($did == 10) { write -dl $+ $did(3).sel Topics.txt | did -r Topic 3 | loadbuf -o Topic 3 Topics.txt }
  if ($did == 11) { did -r Topic 3 | run topics.txt |  $iif($input(Please click ok when you are done editing!,o,Past Topics),loadbuf -o Topic 3 topics.txt) }
}

on *:Dialog:TMChan:sclick:*: {
  if ($did == 3) { write TMChannels.txt $?="Add Channel") | did -r TMChan 1 | loadbuf -o TMChan 1 TMChannels.txt | did -r Topic 7 | loadbuf -o Topic 7 TMChannels.txt }
  if ($did == 4) { write -dl $+ $did(1).sel TMChannels.txt | did -r TMChan 1 | loadbuf -o TMChan 1 TMChannels.txt | did -r Topic 7 | loadbuf -o Topic 7 TMChannels.txt }
}

alias topic { dialog -m Topic Topic }

menu * {
  .Max's Topic Manager: { topic }
}

Comments

Sign in to comment.
MaxEvans   -  Feb 06, 2012

I'll work on that.

 Respond  
SReject   -  Feb 05, 2012

Need multi-network support. Atm if im on #scripting for Dalnet and Quakenet each get's the other's added to it's topic

 Respond  
MaxEvans   -  Feb 04, 2012

I'd like some feedback on this, I'm curious what people think of it.

 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.