home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 35 Internet / 35-Internet.zip / gz-311a.zip / gemzmenu.irc < prev    next >
Text File  |  1999-01-23  |  76KB  |  1,876 lines

  1. #Gemzmenu.irc - MENU File For GemZ (Version 3.06 + OpenChat/2 1.07 ONLY!)
  2. #gemini@silcom.com
  3. #Original code except where indicated
  4. #Menu Layout inspired from menus.scr by [OS3]
  5. #URL Catcher menu interface inspired from menus.scr by [OS3]
  6.  
  7.  
  8. bind ldblclick parse_command ^Normal-LDC
  9. #bind statusrclick parse_command if (C) {chanmenu $C}{if (T) {targetmenu $strip(= $T)}}
  10. bind statusrclick parse_command gzm.rclick
  11. bind rclick parse_command windowlist
  12. bind rclick parse_command rctest
  13. bind shift-rclick parse_command /makepopup $lastclickline(4) $lastclickline(4)
  14. bind alt-statusrclick parse_command //popupmenu cc
  15. bind StatusLDblClick PARSE_COMMAND gz.statusldblclick
  16. bind nicklistrclick parse_command /makepopup $C $lastclickline(4)
  17. bind nicklistldblclick parse_command /talk $lastclickline(4)
  18. bind Alt-NickListRClick parse_command //popupmenu addusermenu $lastclickline(4)
  19.  
  20.  
  21. alias gzm.rclick {
  22.  if ([$lastclickline(3) ] == status_user4) {
  23.   gzm.mailmenu
  24.  }
  25.  else if (C) {chanmenu $C}
  26.  else if (T) {targetmenu $strip(= $T)}
  27. }
  28.  
  29.  
  30. #######################
  31. #3rd party addon stubs#
  32. #######################
  33. alias gz.addonmain {}
  34. #add on to main
  35. alias gz.addonjoin {}
  36. #add on to join
  37. alias gz.addonuser {}
  38. #add on to user
  39. alias gz.addonsrv {}
  40. #add on to srv
  41. alias gz.addonxdcc {}
  42. #add on to xdcc
  43. alias gz.addonmsgs {}
  44. #add on to msgs
  45. alias gz.addongemz {}
  46. #add on to gemz
  47. alias gz.addonhelp {}
  48. #add on to help
  49. ############################################################################
  50. #please call gz.menubarreset from your 3rd party script at the end.  This  #
  51. # will recreate the gemz menus using your 3rd party add ons.               #
  52. ############################################################################
  53.  
  54. ###########################
  55. ##Aliases that menus use.##
  56. ###########################
  57. alias gz.setdelayoptime {
  58.  @ _gt.t = [$"Input (seconds) for delays :"]
  59.  if (_gt.t) {
  60.   @ gz.delayoptime = _gt.t
  61.   gecho Delay time set to $gz.delayoptime seconds.
  62.   @ menucontrol(&setup &202 text Delay Op Time    [$gz.delayoptime seconds])
  63.  }
  64. }
  65.  
  66. alias gz.setigtimeout {
  67.  @ _gt.t = [$"Input (minutes) for default ignore timeouts :"]
  68.  if (_gt.t != []) {
  69.   @ gz.igtimeout = _gt.t
  70.   gecho Default Ignore TimeoutDelay time set to $gz.igtimeout minutes.
  71.   @ menucontrol(&setup &203 text Ignore Timeout    [$gz.igtimeout minutes])
  72.  }
  73. }
  74.  
  75. alias gz.statusldblclick {
  76.  if (match(<M:?> $lastclickline(3)) || (match(<M:??> $lastclickline(3)))) {
  77.   if (fexist($gz.emailclient) == 1) {
  78.    @ gt.workingdir = W
  79.    //^cd $gz.emaildir
  80.    /^exec -start $gz.emailclient
  81.    //^cd $gt.workingdir
  82.   }{
  83.    gecho You do not have Email Client Configured properly in GemZ.
  84.    gecho Go to the Setup menu to configure this.
  85.   }
  86.  }{
  87.   if (C) {_nltog $C}
  88.  }
  89. }
  90.  
  91. alias mail {
  92.  if (fexist($gz.emailclient) == 1) {
  93.   @ gt.workingdir = W
  94.   //^cd $gz.emaildir
  95.   /^exec -start $gz.emailclient
  96.   //^cd $gt.workingdir
  97.  }{
  98.   gecho You do not have Email Client Configured properly in GemZ.
  99.   gecho Go to the Setup menu to configure this.
  100.  }
  101. }
  102.  
  103. #OS2-Mike's idea and code stub.
  104. alias dialogsound {
  105.  @ gt.sndnick = [$0]
  106.  if (ischannel($gt.sndnick)) {
  107.   filedialog OA $sounddir/*.* "Send Sound Files" "Send/Exit" "Send" {
  108.    if ([$0]==[OK]) {/csound $gt.sndnick $decode($1);^assign -gt.sndnick}
  109.    if ([$0]==[APPLY]) {/csound $gt.sndnick $decode($1)}
  110.    if ([$0]==[CANCEL]) {^assign -gt.sndnick}
  111.   }
  112.  }{
  113.   filedialog OA $sounddir/*.* "Send Sound Files" "Send/Exit" "Send" {
  114.    if ([$0]==[OK]) {
  115.     if (ctcpsnd.localfile($decode($1))) {
  116.      /mmpm.playfile $ctcpsnd.fname
  117.      //ctcp $gt.sndnick SOUND $decode($1)
  118.      ^assign -gt.sndnick
  119.     }
  120.    }
  121.    if ([$0]==[APPLY]) {
  122.     if (ctcpsnd.localfile($decode($1))) {
  123.      /mmpm.playfile $ctcpsnd.fname
  124.      //ctcp $gt.sndnick SOUND $decode($1)
  125.     }
  126.    }
  127.    if ([$0]==[CANCEL) {
  128.     ^assign -gt.sndnick
  129.    }
  130.   }
  131.  }
  132. }
  133.  
  134.  
  135. alias gzm.redrawmenus {
  136.  for (@ idx = 0, (win = winitem($idx)) && !done, @ idx++) {
  137.   if (win) {
  138.    if ([$word(6 $win)]!=[<none>]) {
  139.     ^window $word(0 $win) menu $word(6 $win)
  140.    }
  141.   }{@ done = 1}
  142.  }
  143.  ^assign -done;^assign -win;^assign -idx
  144. }
  145.  
  146. alias Normal-LDC {
  147.  @ cw = [$lastclickline(3) ]
  148.  _type_cp_text $cw
  149. # /xtype -literal $cw
  150.  ^assign -cw
  151. }
  152. alias ajoinlist {
  153.  if (autojoinlist) {showajoin}{gecho AutoJoin List is empty}
  154.  input "[AutoJoin] Channel to Add or Delete from AutoJoin List: " if ([$0]!=[]) {
  155.   if ([$ischannel($0)]) {if ([$rmatch($0 $autojoinlist)]) {unajoin $0}{addajoin $0}}{gecho $0 is not a valid channel}
  156.  }
  157. }
  158.  
  159. alias cgtogset {cset $0 TOGGLE}
  160. alias cgset {cset $0;cset $0 $"Enter new Value (Enter=NoChange) : "}
  161. alias gtogset {set $0 TOGGLE;makesetupmenu}
  162. alias gset {set $0;set $0 $"Enter new value (Enter=No change):";makeusermenu}
  163. alias gdupset {
  164.  set $0
  165.  @ _dp.x = [$"Enter new value (Enter=No change): "]
  166.  if (_dp.x != []) {
  167.   if (_dp.x < 3) {
  168.    set $0 $_dp.x
  169.   }{
  170.    gecho DUP: Setting a Dup Value of 3 or higher will cause flood 
  171.    gecho DUP: protection to be triggered too easily.  Dup Values should 
  172.    gecho DUP: be in the range of 0 to 2
  173.   }
  174.  }
  175.  ^assign -_dp.x
  176.  makeusermenu
  177. }
  178.  
  179. alias cgdupset {
  180.  cset $0
  181.  @ _dp.x = [$"Enter new value (Enter=No change): "]
  182.  if (_dp.x != []) {
  183.   if (_dp.x < 3) {
  184.    cset $0 $_dp.x
  185.   }{
  186.    gecho DUP: Setting a Dup Value of 3 or higher will cause flood 
  187.    gecho DUP: protection to be triggered too easily.  Dup Values should 
  188.    gecho DUP: be in the range of 0 to 2
  189.   }
  190.  }
  191.  ^assign -_dp.x
  192.  makeusermenu
  193. }
  194.  
  195.  
  196. alias addtofile {@ gz2.lasturl = [$0];gz.urldesc S}
  197. alias _cm {if ([$0]==[ON] || [$0]==[YES] || [$0]==[1]) {@ FUNCTION_RETURN = [-c]}
  198. }
  199. alias _tog {
  200.  if ([$0]==[ON]) {@ FUNCTION_RETURN = [OFF]}
  201.  else if ([$0]==[OFF]) {@ FUNCTION_RETURN = [ON]}
  202.  else if ([$0]==[YES]) {@ FUNCTION_RETURN = [NO]}
  203.  else if ([$0]==[NO]) {@ FUNCTION_RETURN = [YES]}
  204.  else if ([$0]==[1]) {@ FUNCTION_RETURN = 0}
  205.  else if ([$0]==[0]) {@ FUNCTION_RETURN = 1}
  206. }
  207.  
  208. alias gm.tog {//^assign $0 $_tog($($0));@menucontrol(check $_bool($($0)))}
  209. alias _srd {@ menucontrol(check $_bool($0))}
  210. alias _srt {@ menucontrol(text $0-)}
  211.  
  212. #alias _nltog {
  213. # if ([$ch.nl[$%0]]==[OFF] || !gz.usenklist($0)) {
  214. #  @ ch[nl][$%0] = [ON]
  215. #  //^window nicklist ON
  216. # }{
  217. #  //^window nicklist OFF
  218. #  @ ch[nl][$%0] = [OFF]
  219. # }
  220. #}
  221.  
  222. alias _nltog {
  223.  if (gz.hasnicklist($0)) {
  224.   @ ch[nl][$%0] = [OFF]
  225.   //^window nicklist OFF
  226.  }{
  227.   @ ch[nl][$%0] = [ON]
  228.   //^window nicklist ON
  229.  }
  230. }
  231.  
  232. alias setrpack {
  233.  @ _srpack = [$0]
  234.  filedialog O $exedir/* "Select Pack Rotation [# $_srpack]" "Set" {
  235.   if ([$0]==[OK]) {
  236.    @ rpack[$_srpack] = decode($1-)
  237.    gecho Pack # $_srpack changed to $decode($1-)
  238.    makexdccmenu
  239.    ^assign -_srpack
  240.   }{
  241.    gecho Canceled
  242.   }
  243.  }
  244. }
  245.  
  246. alias _type_cp_text {
  247.     @_input = L
  248.     if (@_input) {
  249.         @_cursor = curpos()
  250.         @_left = left($_cursor $_input)
  251.         @_right = right(${@_input - _cursor} $_input)
  252.         //window setinput ${_cursor + [$@*]} $_left$*$_right
  253.         //^assign -_cursor
  254.         //^assign -_left
  255.         //^assign -_right
  256.     }
  257.     else //window setinput $@* $*
  258.     //^assign -_input
  259. }
  260.  
  261.  
  262. alias webfix {
  263.  @ _weblist = [$webrun($0)]
  264.  if (_weblist) {
  265.   @ webrun(activate $word(0 $_weblist))
  266.   @ webrun($0 pushurl $word(0 $_weblist) $1)
  267.  }{
  268.   if ([$0]==[webexplorer]) {/exec -noshell explore.exe $1}
  269.   if ([$0]==[netscape]) {/exec -start $gt.nspath $browserparams $1}
  270.  }
  271.  ^assign -_weblist
  272. }
  273.  
  274. alias _nickliston {
  275. # takes in $T for window in question
  276.  @ FUNCTION_RETURN = 0
  277.  @ __ref = chanwindow($0)
  278.  if (__ref) {
  279.   for (@ __idx = 0, __win = winitem($__idx), @ __idx++) {
  280.    if (word(0 $__win) == __ref) {
  281.     if (index(N $word(16 $__win)) >= 0) {@ FUNCTION_RETURN = [ON]}
  282.     //break
  283.    }
  284.   }
  285.  }
  286.  ^assign -__ref
  287. }
  288.  
  289. alias _srvc.menu {
  290.  if (isconnected($0)) {
  291.   //window goto ${ww = _srv.win($0)}
  292.   //xecho -window $ww $SHOW_NUMERICS_STR\This server is connected or in process of connecting
  293.  }{
  294.   //window connect $0
  295.  }
  296. }
  297.  
  298. alias _srvn.menu {
  299.  if (isconnected($0)) {
  300.   //window goto ${ww = _srv.win($0)}
  301.   //xecho -window $ww $SHOW_NUMERICS_STR\This server is connected or in process of connecting
  302.  }{
  303.   //window new server $0
  304.  }
  305. }
  306.  
  307. alias _srv.win {
  308.  @ first_choice = 0
  309.  @ second_choice = 0
  310.  for (@win = 0, (ww = winitem($win)) != [], @win++) {
  311.   # if window connected to a needed server
  312.   if (word(2 $ww) == [$0]) {
  313.    # if it has a channel we found what we need
  314.    if (word(3 $ww) != [<none>]) {
  315.     @ first_choice = word(0 $ww)
  316.     break
  317.    }
  318.    else if (!second_choice)
  319.     # no channel, lets remember it in case we don't
  320.     # channels at all on that server
  321.     @ second_choice = word(0 $ww)
  322.    }
  323.   }
  324.  if (first_choice) @ function_return = first_choice
  325.  else @ function_return = second_choice
  326. }
  327.  
  328.  
  329. alias snd.dovolume {
  330.  mmpm.volume $0
  331.  @menucontrol(&snd &$ch.sndvolume check 0)
  332.  @menucontrol(&vol &$ch.sndvolume check 0)
  333.  @ch.sndvolume = [$0]
  334.  @menucontrol(&snd &$ch.sndvolume check 1)
  335.  @menucontrol(&vol &$ch.sndvolume check 1)
  336. }
  337.  
  338. alias getsndfile {
  339.  @ function_return = [$($0.snd)]
  340. }
  341. alias getsndfile {
  342.  @ function_return = (file.exist($snd[$0]) && !file.isdir($snd[$0])) ? file.sanspath($snd[$0]) : [<None>]
  343. }
  344.  
  345.  
  346. alias sndfiledlg {
  347.  @ _curr = snd[$0]
  348.  if (!_curr) {
  349.   @ _curr = [$EXEDIR/sounds/*]
  350.  }{
  351.   if (fexist($_curr) == -1 || fexist($_curr d) == 1) {
  352.    @ _curr = [$EXEDIR/sounds/*]
  353.   }
  354.  }
  355.  /filedialog OA $_curr "Select Sound File" "Ok" "Play Now" sndfiledlgproc $0 $menucontrol(Window) $menucontrol(Item) $$*
  356. }
  357.  
  358. # $0 == window, $1 == item, $2 == type
  359. alias setsndmenutext {
  360.  @ bla = menucontrol(%$0 $1 text)
  361.  @ bla = left($index($chr(9) $bla) $bla)
  362.  @ bla #= chr(9) ## getsndfile($2)
  363.  @ menucontrol(%$0 $1 text $bla)
  364. }
  365.  
  366. alias sndfiledlgproc {
  367. #echo $*
  368.  switch ($3) {
  369.   (OK) {    
  370.    @ snd[$0] = decode($4)
  371.    setsndmenutext $1 $2 $0
  372.    #_as
  373.   }
  374.   (APPLY) {
  375.    mmpm.playfile $decode($4)
  376.   }
  377.   (CANCEL) {
  378.    setsndmenutext $1 $2 $0
  379.   }
  380.  }
  381. }
  382.  
  383. alias disablesnd {
  384.  gecho Sound Disabled \($toupper($0)\)
  385.  @ snd[$0] = []
  386.  _makesndmenu
  387. }
  388.  
  389. ##Menus
  390. alias makemenubar {
  391.  menu -menubar
  392.  menu menubar
  393.  submenu menubar main -s "~Main"
  394.  submenu menubar join -s "~Join"
  395.  submenu menubar user -s "~User"
  396.  submenu menubar srv -s "~Server"
  397.  submenu menubar xdcc -s "~XDCC"
  398.  submenu menubar msgs -s "M~esgs"
  399.  submenu menubar gemz -s "~GemZ"
  400.  submenu menubar help -s "~Help"
  401.  ^set default_menu menubar
  402.  /window menu menubar
  403. }
  404.  
  405. alias makemainmenu {
  406.  menu -main
  407.  menu main
  408.  menuitem main "Snap Windows" {_snapwindows}
  409.  submenu main clsmn "~Clear Screen"
  410.   menuitem clsmn "Clear Screen" {clear}
  411.   menuitem clsmn "Clear Screen (all windows)" {clear -all}
  412.   menuitem clsmn -d "Clear Screen (scrollback)" {clear -scrollback}
  413.   menuitem clsmn "Clear Screen (scroll + all)" {clear -scrollback -all}
  414.  submenu main mainurl "U~RL Catcher"
  415.   menuitem mainurl -d "Load URL File in Browser" {^eval ^exec -noshell $browser file:///$gemz.urlfile}
  416.   menuitem mainurl "Edit URL File" {^eval ^exec e.exe $gemz.urlfile}
  417.   menuitem mainurl "URL Save File     [$gemz.urlfile]" {input "Full Path to save URL List to [$gemz.urlfile] : " if ([$0]) {@ gemz.urlfile = [$0];makesetupmenu}}
  418.  submenu main setup -s "Se~tup"
  419.  menuitem main "Load Color File" {dialogcload}
  420.  menuitem main "Save Color File" {dialogsavec}
  421.  submenu main save "Sa~ve Settings   "
  422.   menuitem save -d "Save GemZ settings + Colors" {gsave}
  423.   menuitem save "Save Color Settings Only" {/savec $exedir/colors.gmz}
  424.   menuitem save "Save XDCC pack list" {xdcc save}
  425.  menuitem main "~Font Setup" { /fontdialog 0 0 }
  426.  menuitem main separator
  427.  menuitem main "Quit" {/si}
  428.  gz.addonmain
  429.  menu main -reset
  430. }
  431.  
  432. alias makesetupmenu {
  433.  menu -setup
  434.  menu setup
  435.   submenu setup wsetup "Window/Status Setup"
  436.    menuitem wsetup -n $_cm($gz.autotalk) "Auto Talk Windows" gm.tog gz.autotalk
  437.    menuitem wsetup -n $_cm($gz.autochat) "Auto Chat Windows" gm.tog gz.autochat
  438.    menuitem wsetup -n $_cm($gz.autotalkfg) "Auto talk/chat windows in foreground" gm.tog gz.autotalkfg
  439.    menuitem wsetup -n $_cm($gz.longcsc) "Detailed NickList On Join" gm.tog gz.longcsc
  440.    menuitem wsetup -n $_cm($clock_24HOUR) "Use 24hour Clock" {^set clock_24hour toggle;_srd $clock_24hour}
  441.    menuitem wsetup -n $_cm($gz.useclock) "Use Clock on status Bar" {useclock toggle;_srd $gz.useclock}
  442.    menuitem wsetup -n $_cm($autodccst) "AutoStatus Bar DCC" gm.tog autodccst
  443.    menuitem wsetup -n $_cm($gz.altstatus) "Alternate Channel Status" gm.tog gz.altstatus
  444.    menuitem wsetup -n $_cm($hourlytime) "Show Hourly Time" gm.tog hourlytime
  445.    menuitem wsetup -n $_cm($gz.halfhour) "Show Half Hour Time" gm.tog gz.halfhour
  446.    menuitem wsetup -n $_cm($gz.timestamps) "TimeStamps on joins/leaves/kicks" gm.tog gz.timestamps
  447.    menuitem wsetup -n $_cm($gz.ovts) "Timestamps in OperView" gm.tog gz.ovts
  448.    menuitem wsetup -n $_cm($gz.inputchan) "Channel on Input line" {gm.tog gz.inputchan;setinput}
  449.    menuitem wsetup -n $_cm($gz.ansi) "Convert Ansi Codes" gm.tog gz.ansi
  450.    menuitem wsetup -n $_cm($gz.nicklist) "New Channels Have Nick List" gm.tog gz.nicklist
  451.    menuitem wsetup -n $_cm($gz.topictitle) "Topic on the titlebar" {gm.tog gz.topictitle;settitlebar}
  452.    menuitem wsetup -n $_cm($gz.notifyoper) "Notify When IRCop joins channel" gm.tog gz.notifyoper
  453.   submenu setup popsetup "Pop Mail"
  454.    menuitem popsetup -n $_cm($gz.popchecking) "Mail Checking" gm.tog gz.popchecking
  455.    menuitem popsetup -n $_cm($gz.popsubject) "Query Subjects" gm.tog gz.popsubject
  456.    menuitem popsetup separator
  457.    menuitem popsetup "Reset and Poll server now" {@ gt.mailwaiting = 0;gz.checkmail;gecho checking...}
  458.    menuitem popsetup 111 "Server:    [$gz.popserver]" gz.popsetserv
  459.    menuitem popsetup 112 "Port:    [$gz.popport]" gz.popsetport
  460.    menuitem popsetup 113 "Username:    [$gz.popname]" gz.popsetname
  461.    menuitem popsetup 114 "Password:    [$left($@decode($gz.poppass) $gt.poptmp)]" gz.popsetpass
  462.    menuitem popsetup 115 "Check Time:    [$gz.poptime min]" gz.popsettime
  463.    menuitem popsetup separator
  464.    submenu popsetup clientset "Email Client"
  465.     menuitem clientset 200 "Client:    [$gz.emailclient]" gz.setemailclient
  466.     menuitem clientset 201 "Working Dir:    [$gz.emaildir]" gz.setemaildir
  467.    menuitem popsetup "Pop / Email Help" {/help email}
  468.   submenu setup tsetup "Misc Toggles"
  469.    menuitem tsetup -n $_cm($auto_whowas) "AutoWhoWas" {set auto_whowas toggle;_srd $auto_whowas}
  470.    menuitem tsetup -n $_cm($ajoinfriends) "AutoJoin From Friends" gm.tog ajoinfriends
  471.    menuitem tsetup -n $_cm($gz.autorejoin) "Auto Rejoin on kick" gm.tog gz.autorejoin
  472.    menuitem tsetup -n $_cm($autotalklogging) "Auto Talk Window logs" gm.tog autotalklogging
  473.    menuitem tsetup -n $_cm($gz.autosave) "Auto Saving of settings" gm.tog gz.autosave
  474.    menuitem tsetup -n $_cm($gz.sounds) "Play Sounds" gm.tog gz.sounds
  475.    menuitem tsetup -n $_cm($gz.confirm) "Require Confirmations" gm.tog gz.confirm
  476.    menuitem tsetup -n $_cm($re.connect) "Auto Reconnect" gm.tog re.connect
  477.    menuitem tsetup -n $_cm($gz.localoper) "Local Oper Mode" gm.tog gz.localoper
  478.    menuitem tsetup -n $_cm($gz.loghilites) "Log hilites" gm.tog gz.loghilites
  479.    menuitem tsetup -n $_cm($gz.loadextras) "Use GemZ Extras" {
  480.     gm.tog gz.loadextras
  481.     if (gz.loadextras) {
  482.      load gzextras.irc
  483.      makegemzmenu
  484.     }{
  485.      ^timer 1 gz.unloadextras
  486.     }
  487.    }
  488.   #//menuitem tsetup "Long Format for Messages  [$gemz.long]" {if ([$gemz.long]==[Yes]) {@ gemz.long = [No]}{@ gemz.long = [Yes]};makemenubar}
  489.    menuitem tsetup -n $_cm($nickcompletion) "Public Nick Completion" gm.tog nickcompletion
  490.    menuitem tsetup -n $_cm($ctcpvers) "Version Reply Codes" gm.tog ctcpvers
  491.    submenu setup ctcpsound "CTCP Sounds"
  492.     menuitem ctcpsound -n $_cm($gz.playifplaying) "Play if already playing" gm.tog gz.playifplaying
  493.     menuitem ctcpsound -n $_cm($ctcpsound) "Allow CTCP Sounds" gm.tog ctcpsound
  494.     menuitem ctcpsound -n $_cm($ctcpsndreq) "Auto Request CTCP Sound files" gm.tog ctcpsndreq
  495.     menuitem ctcpsound -n $_cm($gz.mircsndpatch) "Make Autorequests Public (Mirc patch)" gm.tog gz.mircsndpatch
  496.     menuitem ctcpsound -n $_cm($gz.noctcpaway) "Disable CTCP sounds/requests when away" gm.tog gz.noctcpaway
  497.  submenu setup fixnick -s "Fixed Nick"
  498.   menuitem setup separator
  499.   menuitem setup "Max Wins for talk    [$gz.maxwins]" {input "Max Number of Wins for talk windows [$gz.maxwins] : " if ([$0]) {@ gz.maxwins = [$0];makemenubar}}
  500.   menuitem setup 202 "Delay Op Time    [$gz.delayoptime seconds]" gz.setdelayoptime
  501.   menuitem setup 203 "Ignore Timeout    [$gz.igtimeout minutes]" gz.setigtimeout
  502.   menuitem setup 204 "Log Dir:    [$gz.logdir]" gz.setlogdir
  503.   menuitem setup separator
  504.   submenu setup awymn "Message Setup..."
  505.   menuitem awymn -n $_cm($showpubtime) "Time Stamp on Public Messages" {gm.tog showpubtime}
  506.    menuitem awymn -n $_cm($showmsgtime) "Time Stamp on Private Messages" {gm.tog showmsgtime}
  507.    menuitem awymn -n $_cm($usemsglogfile) "Log Messages to File" {gm.tog usemsglogfile}
  508.    menuitem awymn "Message Log file   [...$right(12 $MSGLOGFILE)]" {gecho Current Message Log location: $MSGLOGFILE;input "Enter path to Message log file (Enter for no change) : " if ([$0]) {@ MSGLOGFILE = [$0-];makemenubar}}
  509.   submenu setup Beeps "System Beep"
  510.    menuitem beeps -n $_cm($gz.beep) "Beeps" gm.tog gz.beep
  511.    menuitem beeps -n $_cm($msgbeeps) "Beep on Messages" gm.tog msgbeeps
  512.   submenu setup setacts "Custom Action File"
  513.    menuitem setacts -n $_cm($loadacts) "Use Custom Actions" gm.tog loadacts
  514.    menuitem setacts "Actions File     [$actionsfile]" {input "Actions File: " if ([$0]) {@ actionsfile = [$gz.fixpath($0)];makemenubar}}
  515.   submenu setup dkick "Default Kicks"
  516.    menuitem dkick -n $_cm($gz.usekfile) "Use Kick file for def. kicks" {gm.tog gz.usekfile}
  517.    menuitem dkick 50 "kickfile   [$defkickf]" {
  518.     filedialog O $exedir/script2/*.k* "Select Kick file" {
  519.      if ([$0]==[OK) {
  520.       @ defkickf = decode($1)
  521.       @ menucontrol(&setup &50 text kickfile    [$defkickf])
  522.      }
  523.     }
  524.    }
  525.   submenu setup snd -s "Sounds"
  526.   submenu setup strings "Strings"
  527.    menuitem strings "Advertisement String     [$gemz.str]" {input "Enter new Ad string, NONE for empty string... [$gemz.str] : " if ([$0]) {if ([$0]==[NONE]) {^assign -gemz.str;makemenubar}{@ gemz.str = [$0-];makemenubar}}}
  528.    menuitem strings "Nick Highlight String    [$nck.buf]" {input "Enter new Highlight string [$nck.buf] : " if ([$0]) {@ nck.buf = [$0-];makemenubar}}
  529.  menu setup -reset
  530. }
  531.  
  532. alias makejoinmenu {
  533.  menu -join
  534.  menu join
  535.  fe ($autojoinlist) ii {
  536.   submenu join join$ii "$ii"
  537.    menuitem join$ii -d "Join Channel" j $ii $ajkeys[$%ii]
  538.    menuitem join$ii "Leave Channel" leave $ii
  539.    menuitem join$ii "Cycle Channel" cycle $ii
  540.    menuitem join$ii "Remove From List" unajoin $ii
  541. #  eval //menuitem join \"Join Channel: $ii\" j $ii $ajkeys[$%ii]
  542.  }
  543.  menuitem join separator
  544.  menuitem join "Leave ~Current Channel" {l}
  545.  menuitem join "~Leave & Kill Current Window" {kw}
  546.  menuitem join "~Edit AutoJoinList" {ajoinlist}
  547.  gz.addonjoin
  548.  menu join -reset
  549. }
  550.  
  551. alias makeawaymenu {
  552.  menu -awaysetup
  553.  menu awaysetup
  554.    menuitem awaysetup -n $_cm($gz.awaymsglog) "Turn on Message log on setting away" gm.tog gz.awaymsglog
  555.    menuitem awaysetup -n $_cm($gz.awaypublog) "Turn on Public Trigger log on away" gm.tog gz.awaypublog
  556.    menuitem awaysetup -n $_cm($gz.qaaway) "Quiet Autoaway" gm.tog gz.qaaway
  557.    menuitem awaysetup -n $_cm($gz.qaway) "Quiet Aways by default" gm.tog gz.qaway
  558.    menuitem awaysetup separator
  559.    menuitem awaysetup 140 "AutoAway Time      [$gz.awaytime\min]" {
  560.     input "Auto setaway time in minutes <0 to disable> [$gz.awaytime] : " if ([$0]!=[]) {
  561.      @ gz.awaytime = [$0];@ menucontrol(&awaysetup &140 text AutoAway Time      [$gz.awaytime\min])
  562.     }
  563.    }
  564.  menu awaysetup -reset
  565. }
  566.  
  567. alias makeusermenu {
  568.  menu -user
  569.  menu user
  570.  submenu user ign -s "~Ignore List"
  571.  submenu user awaysetup -s "Away Setup"
  572.  submenu user awaymenu "Set ~Away"
  573.   menuitem awaymenu -d "Regular Away" {away}
  574.   menuitem awaymenu "Channel Away" {away -c}
  575.   menuitem awaymenu "Quiet Away" {away -q}
  576.  submenu user backmenu "Set ~Back"
  577.   menuitem backmenu -d "Regular Back" {back}
  578.   menuitem backmenu "Channel Back" {cback}
  579.   menuitem backmenu "Quiet Back" {back -q}
  580.  submenu user notifymenu "~Notify Menu   "
  581.   menuitem notifymenu -d "Show Notify" {/shownotify}
  582.  submenu user floodmenu "~Flood Setup"
  583.   submenu floodmenu afmenu "Action Floods    ..."
  584.    menuitem afmenu -n $_cm($ACTIONFLOOD) "Action Flood" {gtogset ACTIONFLOOD;_srd $ACTIONFLOOD}
  585.    menuitem afmenu separator
  586.    menuitem afmenu "Action Flood Count    [$[3]ACTIONFLOOD_COUNT]" {gset ACTIONFLOOD_COUNT}
  587.    menuitem afmenu "Action Flood Time    [$[3]ACTIONFLOOD_TIME]" {gset ACTIONFLOOD_TIME}
  588.    menuitem afmenu "Action Flood DUPS    [$[3]ACTIONFLOOD_DUPS]" {gdupset ACTIONFLOOD_DUPS}
  589.   submenu floodmenu cfmenu "CTCP Floods    ..."
  590.    menuitem cfmenu -n $_cm($CTCPFLOOD) "CTCP Flood" {gtogset CTCPFLOOD;_srd $CTCPFLOOD}
  591.    menuitem cfmenu separator
  592.    menuitem cfmenu "CTCP Flood Count    [$[3]CTCPFLOOD_COUNT]" {gset CTCPFLOOD_COUNT}
  593.    menuitem cfmenu "CTCP Flood Time    [$[3]CTCPFLOOD_TIME]" {gset CTCPFLOOD_TIME}
  594.    menuitem cfmenu "CTCP Flood DUPS    [$[3]CTCPFLOOD_DUPS]" {gdupset CTCPFLOOD_DUPS}
  595.   submenu floodmenu dpmenu "DEOP Floods    ..."
  596.    menuitem dpmenu -n $_cm($DEOPFLOOD) "DEOP Flood" {gtogset DEOPFLOOD;_srd $DEOPFLOOD}
  597.    menuitem dpmenu separator
  598.    menuitem dpmenu "DEOP Flood Count    [$[3]DEOPFLOOD_COUNT]" {gset DEOPFLOOD_COUNT}
  599.    menuitem dpmenu "DEOP Flood Time    [$[3]DEOPFLOOD_TIME]" {gset DEOPFLOOD_TIME}
  600.   submenu floodmenu dimenu "Invite Floods    ..."
  601.    menuitem dimenu -n $_cm($INVITEFLOOD) "Invite Flood" {gtogset INVITEFLOOD;_srd $INVITEFLOOD}
  602.    menuitem dimenu separator
  603.    menuitem dimenu "Invite Flood Count    [$INVITEFLOOD_COUNT]" gset INVITEFLOOD_COUNT
  604.    menuitem dimenu "Invite Flood Time    [$INVITEFLOOD_TIME]" gset INVITEFLOOD_TIME
  605.   submenu floodmenu jfmenu "Join Floods    ..."
  606.    menuitem jfmenu -n $_cm($JOINFLOOD) "Join Flood" {gtogset JOINFLOOD;_srd $JOINFLOOD}
  607.    menuitem jfmenu separator
  608.    menuitem jfmenu "Join Flood Count    [$[3]JOINFLOOD_COUNT]" {gset JOINFLOOD_COUNT}
  609.    menuitem jfmenu "Join Flood Time    [$[3]JOINFLOOD_TIME]" {gset JOINFLOOD_TIME}
  610.   submenu floodmenu kcmenu "KICK Floods    ..."
  611.    menuitem kcmenu -n $_cm($KICKFLOOD) "KICK Flood" {gtogset KICKFLOOD;_srd $KICKFLOOD}
  612.    menuitem kcmenu separator
  613.    menuitem kcmenu "KICK Flood Count    [$[3]KICKFLOOD_COUNT]" {gset KICKFLOOD_COUNT}
  614.    menuitem kcmenu "KICK Flood Time    [$[3]KICKFLOOD_TIME]" {gset KICKFLOOD_TIME}
  615.    menuitem kcmenu "KICK Flood DUPS    [$[3]KICKFLOOD_DUPS]" {gdupset KICKFLOOD_DUPS}
  616.   submenu floodmenu mfmenu "MSG Floods    ..."
  617.    menuitem mfmenu -n $_cm($MSGFLOOD) "MSG Flood" {gtogset MSGFLOOD;_srd $MSGFLOOD}
  618.    menuitem mfmenu separator
  619.    menuitem mfmenu "MSG Flood Count    [$[3]MSGFLOOD_COUNT]" {gset MSGFLOOD_COUNT}
  620.    menuitem mfmenu "MSG Flood Time    [$[3]MSGFLOOD_TIME]" {gset MSGFLOOD_TIME}
  621.    menuitem mfmenu "MSG Flood DUPS    [$[3]MSGFLOOD_DUPS]" {gdupset MSGFLOOD_DUPS}
  622.   submenu floodmenu nifmenu "Nick Floods    ..."
  623.    menuitem nifmenu -n $_cm($NICKFLOOD) "Nick Flood" {gtogset NICKFLOOD;_srd $NICKFLOOD}
  624.    menuitem nifmenu separator
  625.    menuitem nifmenu "Nick Flood Count    [$[3]NICKFLOOD_COUNT]" {gset NICKFLOOD_COUNT}
  626.    menuitem nifmenu "Nick Flood Time    [$[3]NICKFLOOD_TIME]" {gset NICKFLOOD_TIME}
  627.   submenu floodmenu nofmenu "Notify Floods    ..."
  628.    menuitem nofmenu -n $_cm($NOTICEFLOOD) "Notice Flood" {gtogset NOTICEFLOOD;_srd $NOTICEFLOOD}
  629.    menuitem nofmenu separator
  630.    menuitem nofmenu "Notice Flood Count    [$[3]NOTICEFLOOD_COUNT]" {gset NOTICEFLOOD_COUNT}
  631.    menuitem nofmenu "Notice Flood Time    [$[3]NOTICEFLOOD_TIME]" {gset NOTICEFLOOD_TIME}
  632.    menuitem nofmenu "Notice Flood DUPS    [$[3]NOTICEFLOOD_DUPS]" {gdupset NOTICEFLOOD_DUPS}
  633.   submenu floodmenu pfmenu "Public Floods    ..."
  634.    menuitem pfmenu -n $_cm($PUBLICFLOOD) "Public Flood" {gtogset PUBLICFLOOD;_srd $PUBLICFLOOD}
  635.    menuitem pfmenu separator
  636.    menuitem pfmenu "Public Flood Count    [$[3]PUBLICFLOOD_COUNT]" {gset PUBLICFLOOD_COUNT}
  637.    menuitem pfmenu "Public Flood Time    [$[3]PUBLICFLOOD_TIME]" {gset PUBLICFLOOD_TIME}
  638.    menuitem pfmenu "Public Flood DUPS    [$[3]PUBLICFLOOD_DUPS]" {gdupset PUBLICFLOOD_DUPS}
  639.  gz.addonuser
  640.  menu user -reset
  641. }
  642.  
  643. alias makesrvmenu {
  644.  menu -srv
  645.  menu srv
  646.  submenu srv srvc "Change Current Server"
  647.  submenu srv srvn "Connect to new server"
  648.  purge srvgrp
  649.  for (@ srv=0, servername($srv), @srv++) {
  650.   if (srvgrp = servergroup($srv)) {
  651.    if (!srvgrp[srvc][$%srvgrp]) {
  652.     @ srvgrp[srvc][$%srvgrp] = 1
  653.     submenu srvc srvc_$srvgrp "$srvgrp"
  654.    }
  655.    menuitem srvc_$srvgrp ${isconnected($srv)?[-c]:[]} ${srv+1} "$servername($srv):$serverport($srv)" _srvc.menu $srv
  656.    # if submenu does not exist
  657.    if (!srvgrp[srvn][$%srvgrp]) {
  658.     @ srvgrp[srvn][$%srvgrp] = 1
  659.     submenu srvn srvn_$srvgrp "$srvgrp"
  660.    }
  661.    menuitem srvn_$srvgrp ${isconnected($srv)?[-c]:[]} ${srv+100} "$servername($srv):$serverport($srv)" _srvn.menu $srv
  662.   }{
  663.    #servers without a group
  664.    menuitem srvc ${isconnected($srv)?[-c]:[]} "$servername($srv):$serverport($srv)" _srvc.menu $srv
  665.    menuitem srvn ${isconnected($srv)?[-c]:[]} "$servername($srv):$serverport($srv)" _srvn.menu $srv
  666.   }
  667.  }
  668.  menuitem srvc separator
  669.  menuitem srvc "Manually enter server: " {
  670.   @ _kat = [$"Enter Server name"]
  671.   if (_kat) {//^server $_kat}
  672.   ^assign -_kat
  673.  }
  674.  menuitem srvn separator
  675.  menuitem srvn "Manually enter server: " {
  676.   @ _kat = [$"Enter Server name"]
  677.   if (_kat) {//^window new server $_kat}
  678.   ^assign -_kat
  679.  }
  680.  menuitem srv separator
  681.  menuitem srv "~Disconnect" {/disconnect}
  682.  menuitem srv "~Reconnect" {/reconnect}
  683.  menuitem srv separator
  684.  submenu srv iserver "Server ~Information"
  685.   menuitem iserver "~Administration" {admin}
  686.   menuitem iserver "List ~users (Brief)" {lusers}
  687.   menuitem iserver "~Message of the Day" {motd}
  688.   menuitem iserver "Server ~Links" {links}
  689.   menuitem iserver "Server ~Uptime" {stats u}
  690.  menuitem srv "Toggle ~OperVision" {/ov}
  691.  menuitem srv "Reload Servers List" {/loadservers ircserv.txt;makesrvmenu}
  692.  gz.addonsrv
  693.  menu srv -reset
  694. }
  695.  
  696. alias oldmakexdccmenu {
  697.  menu -xdcc
  698.  menu xdcc
  699.  menuitem xdcc "Toggle XDCC ~Window" xdccwin
  700.  menuitem xdcc "Purge the Current Queue" {/qpurge}
  701.  submenu xdcc packs "~Packs"
  702.   menuitem packs "List" {xdcc list}
  703.   menuitem packs "List Specific" {input "List Pack Number? " if ([$0]) {xdcc list \#$0}}
  704.   menuitem packs "Offer" {xdcc offer}
  705.   menuitem packs "DeOffer" {xdcc doffer}
  706.   menuitem packs "Save PackList" {xdcc save}
  707.   menuitem packs "Load Default PackList" {xdcc load}
  708.  submenu xdcc rpacks "Pack Rotation"
  709.   menuitem rpacks -n $_cm($packrotation) "Pack Rotation" {@ packrotation = _tog($packrotation);_srd $packrotation}
  710.   menuitem rpacks separator
  711.   menuitem rpacks "Set Pack1  $rpack[1]" {setrpack 1}
  712.   menuitem rpacks "Set Pack2  $rpack[2]" {setrpack 2}
  713.   menuitem rpacks "Set Pack3  $rpack[3]" {setrpack 3}
  714.   menuitem rpacks "Set Pack4  $rpack[4]" {setrpack 4}
  715.   menuitem rpacks "Set Pack5  $rpack[5]" {setrpack 5}
  716.  submenu xdcc xdccset "XDCC Settings"
  717.   menuitem xdccset -n $_cm($autopreview) "Auto PRE-View Images" {@ autopreview = _tog($autopreview);_srd $autopreview
  718.    gecho Please make sure AutoView is off if using Auto-Preview
  719.    gecho and your Viewier must be setup to use PMView ONLY!
  720.    gecho PMView must have "Progessive Loading" Option Enabled as well.
  721.    }
  722.   menuitem xdccset -n $_cm($qmaxcheck) "Check Queue Before Plist" {@ qmaxcheck = [$_tog($qmaxcheck)];_srd $qmaxcheck}
  723.   submenu xdccset xdccav "AutoView Viewer"
  724.   menuitem xdccav -d "$imageviewer" {
  725.    filedialog O /* "Select AutoView Viewer" "OK" {
  726.     if ([$0]==[OK]) {
  727.      gecho Viewer now changed to $decode($1)
  728.      @ imageviewer = [$decode($1)]
  729.      makexdccmenu
  730.     }{gecho Viewer Unchanged}
  731.    }
  732.   }
  733.   submenu xdccset xdccul "Upload Directory"
  734.   menuitem xdccul -d "$uploaddir" {xdcc uldir}
  735.   submenu xdccset xdccdl "Download Directory"
  736.   menuitem xdccdl -d "$downloaddir" {xdcc dldir}
  737.   menuitem xdccset "DCC Chat Connect Timeout  [$gz.dcctimeout]" {input "DCC Chat timeout [$gz.dcctimeout], 0 to disable : " if ([$0]!=[]) {@ gz.dcctimeout = [$0];makexdccmenu}}
  738.   menuitem xdccset "Send MinSpeed     [$dccminspeed]" {xdcc minspeed}
  739.   menuitem xdccset "Timelimit [$gz.dcctimelimit]" {xdcc timelimit}
  740.   menuitem xdccset "AutoSend Limit    [$dcclimit]" {xdcc limit}
  741.   menuitem xdccset "Max Autoget Size  [$MAX_AUTOGET_SIZE]" {input "Max Autoget size in bytes [$MAX_AUTOGET_SIZE] : " if ([$0]!=[]) {set MAX_AUTOGET_SIZE $0;makexdccmenu}}
  742.   menuitem xdccset "Queue Max [$dccqmax]" {xdcc qmax}
  743.  submenu xdcc xdccsecmenu "XDCC Security"
  744.   menuitem xdccsecmenu -n $_cm($xdccchansec) "XDCC Channel Security" {xdcc chansec $_tog($xdccchansec);_srd $xdccchansec}
  745.   menuitem xdccsecmenu -n $_cm($SECURITY) "XDCC List Security" {xdcc sec $_tog($security);_srd $security}
  746.   menuitem xdccsecmenu "XDCC List Sec. Password       [$xdccpassword]" {xdcc password}
  747.  submenu xdcc transfers "~Transfer"
  748.   menuitem transfers "DCC Activity" {dcc}
  749.   menuitem transfers "DCC Activity (Graphical)" {/dcc glist}
  750.  menuitem xdcc separator
  751.  menuitem xdcc "Send File(s)" mansenddialog
  752.  menuitem xdcc "Send Pack(s)" xdcc psend
  753.  menuitem xdcc "XDCC Status" {XDCC status}
  754.  menu xdcc -reset
  755. }
  756.  
  757. #####################
  758. # THE GemZ XDCC Menu#
  759. #####################
  760. on ^hook "dccchanged*" {makedccmenu}
  761.  
  762. alias makedccmenu {
  763.  menu -dccgl
  764.  menu dccgl
  765.  if (dccitem(0)) {
  766.   #add default when fixed
  767.   menuitem dccgl -d "Display DCC Items" gl
  768.   menuitem dccgl separator
  769.  }{
  770.   menuitem dccgl -d "No DCC's in progress" gl
  771.  }
  772.  for (@ _gl.i = 0, _gl.x = dccitem($_gl.i), @ _gl.i++) {
  773.   if (word(0 $_gl.x) == [chat] || word(0 $_gl.x) == [raw]) {
  774.    submenu dccgl dccsubgl$_gl.i "~$_gl.i $toupper($word(0 $_gl.x)): $word(1 $_gl.x)"
  775.   }{
  776.    submenu dccgl dccsubgl$_gl.i "~$_gl.i $toupper($word(0 $_gl.x)): $word(1 $_gl.x) \($file.sanspath($word(8 $_gl.x))\)" gl $_gl.i
  777.   }
  778.   menuitem dccsubgl$_gl.i -d "Display" gl $_gl.i
  779.   if (xdcc.isoktopreview($file.sanspath($word(8 $_gl.x)))) {
  780.    menuitem dccsubgl$_gl.i "~Preview Image" previewbynum $word(9 $_gl.x)
  781.   }
  782.   menuitem dccsubgl$_gl.i "Close" //dcc close $word(9 $_gl.x)
  783.  }
  784.  purge _gl
  785.  menu dccgl -reset
  786. }
  787.  
  788. makedccmenu
  789.  
  790. alias makexdccmenu {
  791.  menu -xdcc
  792.  menu xdcc
  793.  submenu xdcc dccgl -s "Current DCC Items"
  794.  submenu xdcc xdccoff "Offers..."
  795.   menuitem xdccoff "Create New offer" {xdcc offer}
  796.   menuitem xdccoff "Remove an Existing offer" {xdcc doffer}
  797.   menuitem xdccoff "List your offers (local)" {xdcc list}
  798.   menuitem xdccoff "Notify Current Channel" {xdcc pnotice}
  799.   menuitem xdccoff "Show channel your offers" {xdcc plist}
  800.   menuitem xdccoff separator
  801.   menuitem xdccoff "Save Offer File" {xdcc save}
  802.   menuitem xdccoff "Reload Offer File" {xdcc load}
  803.  submenu xdcc xdcctog "Toggle Settings"
  804.   menuitem xdcctog -n $_cm($gx.autoget) 1 "Autoget" gm.tog gx.autoget
  805.   menuitem xdcctog -n $_cm($gx.autosend) 2 "Autosend" gm.tog gx.autosend
  806.   menuitem xdcctog -n $_cm($gx.autosave) 3 "AutoSave Pack File" gm.tog gx.autosave
  807.   menuitem xdcctog -n $_cm($gx.autonotice) 4 "Auto Public Notice/List" gm.tog gx.autonotice
  808.   menuitem xdcctog -n $_cm($gx.notice) 5 "Use Auto Notices" gm.tog gx.notice
  809.   menuitem xdcctog -n $_cm($gx.nickfile) 11 "File-Nick Renaming" gm.tog gx.nickfile
  810.   menuitem xdcctog separator
  811.   menuitem xdcctog -n $_cm($gx.chansecurity) 6 "Channel Security" gm.tog gx.chansecurity
  812.   menuitem xdcctog -n $_cm($gx.security) 7 "List Security" gm.tog gx.security
  813.   menuitem xdcctog separator
  814.   menuitem xdcctog -n $_cm($gx.autopreview) 8 "Image Auto Preview" gm.tog gx.autopreview
  815.   menuitem xdcctog -n $_cm($gx.spiffyxdcc) 9 "Spiffy Packlist Replies" gm.tog gx.spiffyxdcc
  816.   menuitem xdcctog -n $_cm($gx.xdcclog) 10 "Log Completed Transfers to file" gm.tog gx.xdcclog
  817.  submenu xdcc xdccset "Adjusted Settings"
  818.   menuitem xdccset 50 "Max. Sends    [$gx.maxsends]" xdcc limit
  819.   menuitem xdccset 51 "Max. Queued    [$gx.maxqueue]" xdcc qmax
  820.   menuitem xdccset 52 "Max. Send Time    [$gx.maxtime min]" xdcc maxtime
  821.   menuitem xdccset 53 "Min. Speed    [$gx.minspeed k/s]" xdcc minspeed
  822.   menuitem xdccset separator
  823.   menuitem xdccset 54 "Autolist Time    [$gx.ptime min]" xdcc ptime
  824.   menuitem xdccset 55 "Autosave Time    [$gx.savetime min]" xdcc savetime
  825.   menuitem xdccset 56 "List Sec. Password    [$left($@gx.secpass $gt.poptmp)]" xdcc password
  826.   menuitem xdccset separator
  827.   submenu xdccset xdccdir "Paths"
  828.    menuitem xdccdir 100 "Download Dir    [$DCC_DLDIR]" xdcc dldir
  829.    menuitem xdccdir 102 "Upload Dir    [$gx.uploaddir]" xdcc uldir
  830.    menuitem xdccdir 103 "XDCC Log File    [$gx.xdcclogfile]" xdcc logfile
  831.    menuitem xdccdir 101 "Image Viewer    [$imageviewer]" {
  832.     filedialog O /* "Select AutoView Viewer (PMView Reccommended)" "OK" {
  833.      if ([$0]==[OK]) {
  834.       gecho Viewer now changed to $decode($1)
  835.       @ imageviewer = [$decode($1)]
  836.       @ menucontrol(&xdcc &101 text Image Viewer    [$imageviewer])
  837.      }{gecho Viewer Unchanged}
  838.     }
  839.    }
  840.   menuitem xdccset separator
  841.   submenu xdccset xdccpchan "Autolist Channels"
  842.    menuitem xdccpchan "Add channel(s)" {xdcc.addpchan}
  843.    menuitem xdccpchan separator
  844.    fe ($gx.pchannels) _xs.p {
  845.     menuitem xdccpchan "remove $_xs.p" xdcc.removepchan $_xs.p
  846.    }
  847.   menuitem xdcc separator 
  848.   menuitem xdcc "Toggle XDCC ~Window" xdccwin  
  849.   menuitem xdcc "Send File(s)" mansenddialog
  850.   menuitem xdcc "ReSend File(s)" manresenddialog
  851.   purge _xs.p
  852.  gz.addonxdcc
  853.  menu xdcc -reset
  854. }
  855.  
  856. alias makemsgsmenu {
  857.  menu -msgs
  858.  menu msgs
  859.  menuitem msgs -n $_cm($logging) 1 "Message Log" {gm.tog logging;setlog $logging}
  860.  menuitem msgs -n $_cm($publogging) 2 "Public trigger Log" gm.tog publogging
  861.  menuitem msgs "Create/Kill Message Window" /msgwin
  862.  menuitem msgs separator
  863.  menuitem msgs "Read Message log" /readlog
  864.  menuitem msgs "Delete Message log" /remlog
  865.  menuitem msgs separator
  866.  menuitem msgs "Read Public Message Log" /readpublog
  867.  menuitem msgs "Delete Public Message Log" /rempublog
  868.  menuitem msgs separator
  869.  menuitem msgs "Delete Both Logs" /remall
  870.  gz.addonmsgs
  871.  menu msgs -reset
  872. }
  873.  
  874. alias reload {
  875.  ^timer 1 /load gemz2fp.irc
  876. }
  877.  
  878.  
  879.  
  880. alias makegemzmenu {
  881.  menu -gemz
  882.  menu gemz
  883.  menuitem gemz "~Stop all Sounds" {/mmpm.stop}
  884.  menuitem gemz "Play a Soundfile" {dialogplay}
  885.  submenu gemz snd -s "Sound Configuration"
  886.  submenu gemz vol -s "~Volume Control"
  887.  submenu gemz version "Version"
  888.   menuitem version "Show ~Version Info Local" {version}
  889.   menuitem version "~Show Version to Channel" {/sgv}
  890.  if (gz.extras) {
  891.   submenu gemz muppets "Muppets"
  892.    menuitem muppets "Beaker" {/beaker}
  893.    menuitem muppets "Fozzie Bear" {/fozzie}
  894.    menuitem muppets "Swedish Chef" {/bork}
  895.  }
  896.  menuitem gemz "Save Settings" {/gsave}
  897.  menuitem gemz "GemZ ~Help" {/help index}
  898.  submenu gemz reload "~Reload/Load"
  899.   menuitem reload "Reload ~Script" {reload}
  900.   menuitem reload "Reload ~Colors" {/load $exedir/colors.gmz}
  901.   menuitem reload "Reload Ac~tion File" {/loadplug $actionsfile}
  902.  menuitem gemz "~Save Default Postion" {
  903.   @ __saved = []
  904.   for (@ idx = 0, (win = winitem($idx)), @ idx++) {
  905.    if (word(3 $win)==C || word(5 $win)==T) {
  906.     ^savedefpos $word(0 $win)
  907.     @ __saved = 1
  908.     //break
  909.    }
  910.   }
  911.   if (!__saved) {^savedefpos $word(0 $winitem(0))}
  912.   ^assign -__saved
  913.  }
  914.  gz.addongemz
  915.  menu gemz -reset
  916. }
  917.  
  918. alias makehelpmenu {
  919.  menu -help
  920.  menu help
  921.  menuitem help "~Index" help index
  922.  menuitem help "Commands" help index
  923.  menuitem help "~Keys" help keys
  924.  menuitem help "M~ouse" help mouse
  925.  menuitem help "User~Levels" help userlist
  926.  menuitem help "~Channel Toggles" help channel
  927.  menuitem help "~Kicks" help kicks
  928.  menuitem help "Mis~c" help misc
  929.  menuitem help "What's NEW?" help whatsnew
  930.  gz.addonhelp
  931.  menu help -reset
  932. }
  933.  
  934. alias _makesndmenu {
  935.  menu -snd
  936.  menu snd
  937.  menuitem snd "Preview Sounds" {dialogplay}
  938.  menuitem snd separator
  939.  submenu snd sndevent "Sound Event Files"
  940.   menuitem sndevent "Messages Sound:    $getsndfile(msg)" /sndfiledlg msg
  941.   menuitem sndevent "DCC Get Connect:    $getsndfile(getconnect)" /sndfiledlg getconnect
  942.   menuitem sndevent "DCC Get Finished:    $getsndfile(dccgetfin)" /sndfiledlg dccgetfin
  943.   menuitem sndevent "DCC Send Connect:    $getsndfile(sendconnect)" /sndfiledlg sendconnect
  944.   menuitem sndevent "DCC Send Finished:    $getsndfile(dccsendfin)" /sndfiledlg dccsendfin
  945.   menuitem sndevent "DCC Chat Message:    $getsndfile(chat)" /sndfiledlg chat
  946.   menuitem sndevent "DCC Chat Connect:    $getsndfile(chatconnect)" /sndfiledlg chatconnect
  947.   menuitem sndevent "Received DCC Request:    $getsndfile(gotdccreq)" /sndfiledlg gotdccreq
  948.   menuitem sndevent "Nick Hilite:    $getsndfile(pub)" /sndfiledlg pub
  949.   menuitem sndevent "Nick Joined a Channel:    $getsndfile(join)" /sndfiledlg join
  950.   menuitem sndevent "You are kicking:    $getsndfile(mekick)" /sndfiledlg mekick
  951.   menuitem sndevent "You've been Kicked:    $getsndfile(youkick)" /sndfiledlg youkick
  952.   menuitem sndevent "Other Person Kicked:    $getsndfile(kick)" /sndfiledlg kick
  953.   menuitem sndevent "Set Away:    $getsndfile(away)" /sndfiledlg away
  954.   menuitem sndevent "Set Back:    $getsndfile(back)" /sndfiledlg back
  955.   menuitem sndevent "Close Window:    $getsndfile(wkill)" /sndfiledlg wkill
  956.   menuitem sndevent "Open Window:    $getsndfile(wopen)" /sndfiledlg wopen
  957.   menuitem sndevent "Notify Signon:    $getsndfile(notify)" /sndfiledlg notify
  958.   menuitem sndevent "Notify Signoff:    $getsndfile(notifyoff)" /sndfiledlg notifyoff
  959.   menuitem sndevent "Hilite list Word:    $getsndfile(hilitelist)" /sndfiledlg hilitelist
  960.   menuitem sndevent "New Mail Notice:    $getsndfile(newmail)" /sndfiledlg newmail
  961.  submenu snd sndeventstat "Disable Sound Event Status"
  962.   menuitem sndeventstat "Messages Sound" /disablesnd msg
  963.   menuitem sndeventstat "DCC Get Connect" /disablesnd getconnect
  964.   menuitem sndeventstat "DCC Get Finished" /disablesnd dccgetfin
  965.   menuitem sndeventstat "DCC Send Connect" /disablesnd sendconnect
  966.   menuitem sndeventstat "DCC Send Finished" /disablesnd dccsendfin
  967.   menuitem sndeventstat "DCC Chat Message" /disablesnd chat
  968.   menuitem sndeventstat "DCC Chat Connect" /disablesnd chatconnect
  969.   menuitem sndeventstat "Received DCC request" /disablesnd gotdccreq
  970.   menuitem sndeventstat "Nick Hilite" /disablesnd pub
  971.   menuitem sndeventstat "Nick Joined a Channel" /disablesnd join
  972.   menuitem sndeventstat "You are kicking" /disablesnd mekick
  973.   menuitem sndeventstat "You've been Kicked" /disablesnd youkick
  974.   menuitem sndeventstat "Other Person Kicked" /disablesnd kick
  975.   menuitem sndeventstat "Set Away" /disablesnd away
  976.   menuitem sndeventstat "Set Back" /disablesnd back
  977.   menuitem sndeventstat "Close Window" /disablesnd wkill
  978.   menuitem sndeventstat "Open Window" /disablesnd wopen
  979.   menuitem sndeventstat "Notify Signon" /disablesnd notify
  980.   menuitem sndeventstat "Notify Signoff" /disablesnd notifyoff
  981.   menuitem sndeventstat "Hilite list Word" /disablesnd hilitelist
  982.   menuitem sndeventstat "New Mail Notice" /disablesnd newmail
  983.  submenu snd sndvolume "Volume"
  984.   menuitem sndvolume -n 10 "10 %" snd.dovolume 10
  985.   menuitem sndvolume -n 20 "20 %" snd.dovolume 20
  986.   menuitem sndvolume -n 30 "30 %" snd.dovolume 30
  987.   menuitem sndvolume -n 40 "40 %" snd.dovolume 40
  988.   menuitem sndvolume -n 50 "50 %" snd.dovolume 50
  989.   menuitem sndvolume -n 60 "60 %" snd.dovolume 60
  990.   menuitem sndvolume -n 70 "70 %" snd.dovolume 70
  991.   menuitem sndvolume -n 80 "80 %" snd.dovolume 80
  992.   menuitem sndvolume -n 90 "90 %" snd.dovolume 90
  993.   menuitem sndvolume -n 100 "100 %" snd.dovolume 100
  994.  menu snd -reset
  995. }
  996.  
  997. _makesndmenu
  998.  
  999. alias makevolmenu {
  1000.  menu -vol
  1001.  menu vol
  1002.  menuitem vol -n 10 "10 %" snd.dovolume 10
  1003.  menuitem vol -n 20 "20 %" snd.dovolume 20
  1004.  menuitem vol -n 30 "30 %" snd.dovolume 30
  1005.  menuitem vol -n 40 "40 %" snd.dovolume 40
  1006.  menuitem vol -n 50 "50 %" snd.dovolume 50
  1007.  menuitem vol -n 60 "60 %" snd.dovolume 60
  1008.  menuitem vol -n 70 "70 %" snd.dovolume 70
  1009.  menuitem vol -n 80 "80 %" snd.dovolume 80
  1010.  menuitem vol -n 90 "90 %" snd.dovolume 90
  1011.  menuitem vol -n 100 "100 %" snd.dovolume 100
  1012.  menu vol -reset
  1013. }
  1014.  
  1015. makevolmenu
  1016.  
  1017. alias fixnickmenu {
  1018.  menu -fixnick
  1019.  menu fixnick
  1020.  fe ($gz.servergroups()) _fn.g {
  1021.   if (fn[$_fn.g] == []) {@ fn[$_fn.g] = 0}
  1022.   if (fn[$_fn.g][nick] == []) {@ fn[$_fn.g][nick] = N}
  1023.   submenu fixnick fn$_fn.g "$_fn.g"
  1024.    menuitem fn$_fn.g -n $_cm($fn[$_fn.g]) "Nick Locking" gm.tog fn[$_fn.g]
  1025.    menuitem fn$_fn.g separator
  1026.    menuitem fn$_fn.g "Nick:    $fn[$_fn.g][nick]" fixnick $_fn.g
  1027.  }
  1028.  menu fixnick -reset
  1029.  purge _fn
  1030. }
  1031.  
  1032. fixnickmenu
  1033.  
  1034.  
  1035. #Initial Setup of all menus (in the menubar mostly)
  1036. alias gz.menubarreset {
  1037. makemenubar
  1038. makesetupmenu
  1039. makemainmenu
  1040. makejoinmenu
  1041. makeusermenu
  1042. makesrvmenu
  1043. makexdccmenu
  1044. makemsgsmenu
  1045. makegemzmenu
  1046. makehelpmenu
  1047. makeawaymenu
  1048. gzm.redrawmenus
  1049. }
  1050.  
  1051. gz.menubarreset
  1052.  
  1053.  
  1054. ##POPUP MENUS
  1055.  
  1056. #popup mail menu
  1057. alias gzm.mailmenu {
  1058.  menu -gzm.mailmenu
  1059.  menu gzm.mailmenu
  1060.  menuitem gzm.mailmenu "Launch Email Client" {/mail}
  1061.  menuitem gzm.mailmenu "Reset and Poll server now" {@ gt.mailwaiting = 0;gz.checkmail;gecho checking...}
  1062.  popupmenu gzm.mailmenu
  1063. }
  1064.  
  1065. #Popup Channel Menu inspired by menus.scr by OS3
  1066. alias chanmenu {
  1067. @ cc = [$0]
  1068.  menu -popcm
  1069.  menu popcm
  1070.  if (match($cc $mychannels())) {
  1071.   if (cc != T) {//menuitem popcm "goto $cc window" /j $cc}
  1072.   //menuitem popcm \"~Leave: $cc\" {leave $cc}
  1073.  }{//menuitem popcm \"~Join: $cc\" {join $cc}}
  1074.  if (match($cc $autojoinlist)) {//menuitem popcm "~Remove from AJoin" {unajoin $cc}}{//menuitem popcm "~Add to AJoin" {addajoin $cc}}
  1075.  if (match($cc $mychannels())) {
  1076.   if (match($cc $chanloglist)) {
  1077.    menuitem popcm "Stop Logging" {winlog OFF $cc}
  1078.   }{
  1079.    if (!chlog[$%cc][logfile]) {
  1080.     menuitem popcm "Start Logging" {
  1081.      filedialog S $exedir/*.log "Logfile for $cc" "Set" {
  1082.       if ([$0]==[OK]) {winlog ON $cc $decode($1-)}
  1083.      }
  1084.     }
  1085.    }{menuitem popcm "Start Logging" {winlog ON $cc $(chlog[$%cc][logfile])}}
  1086.   }
  1087.   menuitem popcm "Change Logfile" {
  1088.    if ([$(chlog[$%cc][stat])]!=[ON]) {
  1089.     filedialog S $exedir/*.log "Logfile for $cc" "Set" {
  1090.      if ([$0]==[OK]) {
  1091.       window logfile $decode($1-)
  1092.       @ chlog[$%cc][logfile] = decode($1-)
  1093.      }
  1094.     }
  1095.    }{gecho You must turn Logging off before changing the log file}
  1096.   }
  1097.  }
  1098. if (![$1]) {
  1099.  menuitem popcm separator
  1100.  submenu popcm csetup "Channel Setup"
  1101.   menuitem csetup $_cm($_nickliston($cc)) "Use Nicklist" {/_nltog $cc}
  1102.   #menuitem csetup $_cm($getctog($cc A)) "Translate Mirc Colors" {/togctog $cc A}
  1103.   menuitem csetup $_cm($getctog($cc R)) "Don't Request CTCP Sounds" {/togctog $cc R}
  1104.   menuitem csetup $_cm($getctog($cc S)) "Don't Play CTCP Sounds" {/togctog $cc S}
  1105.   menuitem csetup $_cm($getctog($cc D)) "Bitch mode" {/togctog $cc D}
  1106.   menuitem csetup $_cm($getctog($cc B)) "Kick banned users" {/togctog $cc B}
  1107.   menuitem csetup $_cm($getctog($cc N)) "Nethack Protection" {/togctog $cc N}
  1108.   menuitem csetup $_cm($getctog($cc C)) "BanKick Flooders" {/togctog $cc C}
  1109.   menuitem csetup $_cm($getctog($cc U)) "Ban Timeouts" {/togctog $cc U}
  1110.   menuitem csetup $_cm($getctog($cc Z)) "Compress modes" {/togctog $cc Z}
  1111.   //menuitem csetup $_cm($getctog($cc M)) "Ignore identd" {/togctog $cc M}
  1112.   //menuitem csetup "Lock channel mode: $ch.lock[$%cc]" {/asklock $cc}
  1113.  
  1114.  //submenu popcm csets "Channel Flood Setup"
  1115.   //submenu csets caction "Actions"
  1116.    //menuitem caction $_cm($cset($cc ACTIONFLOOD)) "Action Flood" cgtog ACTIONFLOOD
  1117.    //menuitem caction separator
  1118.    //menuitem caction "Action Flood Count       [$cset($cc ACTIONFLOOD_COUNT)]" cgset ACTIONFLOOD_COUNT
  1119.    //menuitem caction "Action Flood Dups        [$cset($cc ACTIONFLOOD_DUPS)]" cgdupset ACTIONFLOOD_DUPS
  1120.    //menuitem caction "Action Flood Time        [$cset($cc ACTIONFLOOD_TIME)]" cgset ACTIONFLOOD_TIME
  1121.   //submenu csets cctcp "CTCPs"
  1122.    //menuitem cctcp "CTCP Flood [$cset($cc CTCPFLOOD)]" cgtog CTCPFLOOD
  1123.    //menuitem cctcp "CTCP Flood Count   [$cset($cc CTCPFLOOD_COUNT)]" cgset CTCPFLOOD_COUNT
  1124.    //menuitem cctcp "CTCP Flood Dups    [$cset($cc CTCPFLOOD_DUPS)]" cgdupset CTCPFLOOD_DUPS
  1125.    //menuitem cctcp "CTCP Flood Time    [$cset($cc CTCPFLOOD_TIME)]" cgset CTCPFLOOD_TIME
  1126.   //submenu csets cdeop "Deop"
  1127.    //menuitem cdeop "DEOP Flood [$cset($cc DEOPFLOOD)]" cgtog DEOPFLOOD
  1128.    //menuitem cdeop "DEOP Flood Count   [$cset($cc DEOPFLOOD_COUNT)]" cgset DEOPFLOOD_COUNT
  1129.    //menuitem cdeop "DEOP Flood Dups    [$cset($cc DEOPFLOOD_DUPS)]" cgdupset DEOPFLOOD_DUPS
  1130.    //menuitem cdeop "DEOP Flood Time    [$cset($cc DEOPFLOOD_TIME)]" cgset DEOPFLOOD_TIME
  1131.    //submenu csets cjoin "Joins"
  1132.    //menuitem cjoin "Join Flood [$cset($cc JOINFLOOD)]" cgtog JOINFLOOD
  1133.    //menuitem cjoin "Join Flood Count   [$cset($cc JOINFLOOD_COUNT)]" cgset JOINFLOOD_COUNT
  1134.    //menuitem cjoin "Join Flood Time    [$cset($cc JOINFLOOD_TIME)]" cgset JOINFLOOD_TIME
  1135.   //submenu csets ckick "Kicks"
  1136.    //menuitem ckick "Kick Flood [$cset($cc KICKFLOOD)]" cgtog KICKFLOOD
  1137.    //menuitem ckick "Kick Flood Count   [$cset($cc KICKFLOOD_COUNT)]" cgset KICKFLOOD_COUNT
  1138.    //menuitem ckick "Kick Flood Dups    [$cset($cc KICKFLOOD_DUPS)]" cgdupset KICKFLOOD_DUPS
  1139.    //menuitem ckick "Kick Flood TIME    [$cset($cc KICKFLOOD_TIME)]" cgset KICKFLOOD_TIME
  1140.   //submenu csets cnick "Nicks"
  1141.    //menuitem cnick "Nick Flood [$cset($cc NICKFLOOD)]" cgtog NICKFLOOD
  1142.    //menuitem cnick "Nick Flood Count   [$cset($cc NICKFLOOD_COUNT)]" cgset NICKFLOOD_COUNT
  1143.    //menuitem cnick "Nick Flood Time    [$cset($cc NICKFLOOD_TIME)]" cgset NICKFLOOD_TIME
  1144.   //submenu csets cnot "Notices"
  1145.    //menuitem cnot "Notice Flood        [$cset($cc NOTICEFLOOD)]" cgtog NOTICEFLOOD
  1146.    //menuitem cnot "Notice Flood Count  [$cset($cc NOTICEFLOOD_COUNT)]" cgset NOTICEFLOOD_COUNT
  1147.    //menuitem cnot "Notice Flood Dups   [$cset($cc NOTICEFLOOD_DUPS)]" cgdupset NOTICEFLOOD_DUPS
  1148.    //menuitem cnot "Notice Flood Time   [$cset($cc NOTICEFLOOD_TIME)]" cgset NOTICEFLOOD_TIME
  1149.   //submenu csets cpub "Public"
  1150.    //menuitem cpub "Public Flood        [$cset($cc PUBLICFLOOD)]" cgtog PUBLICFLOOD
  1151.    //menuitem cpub "Public Flood Count  [$cset($cc PUBLICFLOOD_COUNT)]" cgset PUBLICFLOOD_COUNT
  1152.    //menuitem cpub "Public Flood Dups   [$cset($cc PUBLICFLOOD_DUPS)]" cgdupset PUBLICFLOOD_DUPS
  1153.    //menuitem cpub "Public Flood Time   [$cset($cc PUBLICFLOOD_TIME)]" cgset PUBLICFLOOD_TIME
  1154.  //submenu popcm cmm "Channel Stats"
  1155.   if (gz.longcsc) {
  1156.    //menuitem cmm -d "Names (detailed)" {/csc}
  1157.    //menuitem cmm "Names (short)" {cnames}
  1158.   }{
  1159.    //menuitem cmm -d "Names (short)" {cnames}
  1160.    //menuitem cmm "Names (detailed)" {/csc}
  1161.   }
  1162.   //menuitem cmm "Who (Detailed)" {cwho}
  1163.   //menuitem cmm "Show Channel Bans" {csb}
  1164.   //menuitem cmm "Show Channel Topic" {t}
  1165.  //submenu popcm cModes "Modes"
  1166.   //menuitem cmodes "Show Modes" {gecho Mode For $cc is \+$chanmode($cc)}
  1167.   //menuitem cmodes "Remove Keys (unlock)" {unlock}
  1168.   //submenu cmodes csetmode "Set Modes"
  1169.    //menuitem csetmode "Mode (+nst)" {/mode $cc +nst}
  1170.    //menuitem csetmode "Mode (+inst)" {/mode $cc +inst}
  1171.   //submenu cmodes creset "Reset Modes"
  1172.    //menuitem creset "Reset (+nst)" {/creset}
  1173.    //menuitem creset "Reset (+inst)" {/creseti}
  1174.   //submenu cmodes cmass "Mass"
  1175.    //menuitem cmass "Mass Op (+o)" {mop}
  1176.    //menuitem cmass "Mass DeOp (-o)" {mdeop}
  1177.    //menuitem cmass "Mass Voice (+v)" {massvoice}
  1178.    //menuitem cmass "Mass UnVoice (-v)" {massunvoice}
  1179.  //menuitem popcm separator
  1180.   //submenu popcm credir "Redirects"
  1181.   //submenu credir lrm "Last Received Message"
  1182.    //menuitem lrm "=>  Channel" {relm}
  1183.    //menuitem lrm "=>  Topic" {tlm}
  1184.    //menuitem lrm "=>  Wall" {wlm}
  1185.   //submenu credir lrn "Last Received Notice"
  1186.    //menuitem lrn "=>  Channel" {reln}
  1187.    //menuitem lrn "=>  Topic" {tln}
  1188.    //menuitem lrn "=>  Wall" {wln}
  1189.   //submenu credir lsm "Last Sent Message"
  1190.    //menuitem lsm "=>  Channel" {relsm}
  1191.    //menuitem lsm "=>  Topic" {tlsm}
  1192.    //menuitem lsm "=>  Wall" {wlsm}
  1193.   //submenu credir lsn "Last Sent Notice"
  1194.    //menuitem lsn "=>  Channel" {relsn}
  1195.    //menuitem lsn "=>  Topic" {tlsn}
  1196.    //menuitem lsn "=>  Wall" {wlsn}
  1197.  //submenu popcm other "Other"
  1198.   //menuitem other "Channel Away" {away -c}
  1199.   //menuitem other "Channel Back" {cback}
  1200.   //menuitem other "Cycle" {cycle}
  1201.   //menuitem other "Check Offers" {/ctcp $cc xdcc list}
  1202.   //menuitem other "Check ctcp Time" {/ctcp $cc time}
  1203.  //menuitem popcm "Paste Status Bar" {
  1204.   fe ($lastclickline()) _lcl.1 {
  1205.    @ _lcl.2 = [$_lcl.2]##[ $_lcl.1]
  1206.   }
  1207.   send $_lcl.2;purge _lcl
  1208.  }
  1209.  //menuitem popcm "Send Sound" dialogsound $cc
  1210.  //menuitem popcm separator
  1211.  //submenu popcm cgreets "Greets"
  1212.   //menuitem cgreets "moo" {/say moo!}
  1213.   //menuitem cgreets "zug zug" {/say zug zug}
  1214.   //menuitem cgreets "Hey all" {/say Hey all}
  1215.   //menuitem cgreets "'lo" {/say 'lo}
  1216.   //menuitem cgreets "What's up folks?" {/say What's up folks?}
  1217.  //submenu popcm cacts "Actions"
  1218.   //menuitem cacts "Binoculars" {/me pulls out $gender binoculars and searches $cc for intelligent life.... Damn... None to be found!}
  1219.   //menuitem cacts "Gerbil Release" {/me releases $gender gerbils upon $cc, run while you can!!!}
  1220.   //menuitem cacts "PinDrop" {/me drops the proverbial pin...}
  1221.   //menuitem cacts "Slide" {/me slides into the channel...  dances a happy jig... falls on $gender arse in the process}
  1222.  //submenu popcm cbyes "Byes"
  1223.   //menuitem cbyes "Later all" {/say Later all}
  1224.  //menuitem popcm separator
  1225.  //menuitem popcm "Ping" {ping $CC}
  1226.  //menuitem popcm "Version" {ver $CC}
  1227. }
  1228.   popupmenu popcm
  1229.   #^assign -cc
  1230. }
  1231.  
  1232. alias windowlist {
  1233.  @ _ll.l = lastclickline(0)
  1234.  if (![$0]) {@ _cw = lastclickline(3);@ __cw = lastclickline(4)}{@ _cw = []}
  1235.  if ((word(2 $_ll.l) == [SOUND:]) && (![$0])  && (word(4 $_ll.l) == [\(autorequest])) {
  1236.   menu -tmpmenu
  1237.   menu tmpmenu
  1238.   if (gz.mircsndpatch) {
  1239.      //^quote PRIVMSG $1 :!$0 $3
  1240.    menuitem tmpmenu "request Sound [$word(3 $_ll.l)]" /msg $C !$word(1 $_ll.l) $word(3 $_ll.l)
  1241.     }{
  1242.    menuitem tmpmenu "request Sound [$word(3 $_ll.l)]" /msg $word(1 $_ll.l) !$word(1 $_ll.l) $word(3 $_ll.l)
  1243.     }
  1244. #  menuitem tmpmenu "request Sound [$word(3 $_ll.l)]" /msg $word(1 $_ll.l) !$word(1 $_ll.l) $word(3 $_ll.l)
  1245.   popupmenu tmpmenu
  1246.  }
  1247.  else if ((rmatch($_cw *.??*)) && (@_cw > 4)) {
  1248.   if (!rmatch($_cw http://* ftp://* gopher://*)) {@_cw=[http://]##_cw}
  1249.   urlmenu $_cw;^assign -_cw
  1250.  }
  1251. # else if (ischannel($strip(@\'\"\(\) $_cw))) {chanmenu $strip(@\'\"\(\) $_cw) -d;^assign -_cw}
  1252.  else if (ischannel($gz.safechan($_cw))) {chanmenu $gz.safechan($_cw) -d;^assign -_cw}
  1253. # else if (ischannel($strip(+@\'\"\(\) $_cw))) {chanmenu $_cw -d;^assign -_cw}
  1254.  else if (__cw == T && [$T]!=[]) {targetmenu $T}
  1255.  else {
  1256.   menu -menulist
  1257.   menu menulist
  1258.   #submenu menulist setup -s "Setup"
  1259.   //submenu menulist pastepop "Clipboard"
  1260.    //menuitem pastepop -d "Paste Formatted" if (T) {pasteto $T}{gecho Nobody to Paste To}
  1261.    //menuitem pastepop "Paste Optimized" smartpaste
  1262.   if ([$fexist($exedir/offers.exe)]==[1]) {
  1263.    //submenu menulist pofmn "Offer Selection"
  1264.     //menuitem pofmn "Request ALL Pack Lists" goffers
  1265.     //menuitem pofmn "Select Pack Lists" selectoffers
  1266.     //menuitem pofmn "Clear Pack Lists" clearofferlist
  1267.   }
  1268.   if (lastclickline(3)) {
  1269.    //submenu menulist webster "Dictionary"
  1270.     //menuitem webster "Define: $strip(\[\]!@#$%^&*\(\)-_=+\\|,.<>\/?~`\" $lastclickline(3))" define $strip(\[\]!@#$%^&*\(\)-_=+\\|,.<>\/?~`\" $lastclickline(3))
  1271.     //menuitem webster "Spell:  $strip(\[\]!@#$%^&*\(\)-_=+\\|,.<>\/?~`\" $lastclickline(3))" spell $strip(\[\]!@#$%^&*\(\)-_=+\\|,.<>\/?~`\" $lastclickline(3))
  1272.   }
  1273.   //submenu menulist popsave "Save..."
  1274.    //menuitem popsave "Save All Settings" {gsave}
  1275.    //menuitem popsave "Save Userlist/Channel Settings" {_save_userlist}
  1276.    //menuitem popsave "Save XDCC Pack List" {xdcc save}
  1277.   //menuitem menulist "Change Font" {fontdialog 0 0}
  1278.   //submenu menulist statmenu "Status Bar"
  1279.    //menuitem statmenu -d "Normal StatusBar" {setstatusbar}
  1280.    //menuitem statmenu "DCC StatusBar" {statgl}
  1281.   makedccmenu
  1282.   submenu menulist subdcc "Current DCC Items"
  1283.   if (dccitem(0)) {
  1284.   #add default when fixed
  1285.    menuitem subdcc -d "Display DCC Items" gl
  1286.    menuitem subdcc separator
  1287.   }{
  1288.    menuitem subdcc -d "No DCC's in progress" gl
  1289.   }
  1290.   for (@ _gl.i = 0, _gl.x = dccitem($_gl.i), @ _gl.i++) {
  1291.    if (word(0 $_gl.x) == [chat] || word(0 $_gl.x) == [raw]) {
  1292.     submenu subdcc subdccsubgl$_gl.i "~$_gl.i $toupper($word(0 $_gl.x)): $word(1 $_gl.x)"
  1293.    }{
  1294.     submenu subdcc subdccsubgl$_gl.i "~$_gl.i $toupper($word(0 $_gl.x)): $word(1 $_gl.x) \($file.sanspath($word(8 $_gl.x))\)" gl $_gl.i
  1295.    }
  1296.    menuitem subdccsubgl$_gl.i -d "Display" gl $_gl.i
  1297.    if (xdcc.isoktopreview($file.sanspath($word(8 $_gl.x)))) {
  1298.     menuitem subdccsubgl$_gl.i "~Preview Image" previewbynum $word(9 $_gl.x)
  1299.    }
  1300.    menuitem subdccsubgl$_gl.i "Close" //dcc close $word(9 $_gl.x)
  1301.   }
  1302.   purge _gl
  1303.   //menuitem menulist "Show Notify" {shownotify}
  1304.   //menuitem menulist separator
  1305.   //menuitem menulist -s "« Window list »   " #
  1306.   @ done = 0
  1307.   for (@ idx = 0, (win = winitem($idx)) && !done, @ idx++) {
  1308.    if (win) {
  1309.     if ([$word(3 $win)]!=[<none>]) {
  1310.      //menuitem menulist "~$idx  $word(3 $win)    [$word(0 $win)]" //window show $word(0 $win)
  1311.     }{
  1312.      //menuitem menulist "~$idx  $word(1 $win)    [$word(0 $win)]" //window show $word(0 $win)
  1313.     }
  1314.    }{@ done = 1}
  1315.   }
  1316.   popupmenu menulist
  1317.  }
  1318.  ^assign -_cw;^assign -__cw
  1319.  ^assign -done
  1320. }
  1321.  
  1322.  
  1323. alias urlmenu {
  1324.  @ url = [$strip(\(\)\" $0)]
  1325.  if (url) {
  1326.   menu -wm
  1327.   menu wm
  1328.   //submenu wm wm3 "Netscape"
  1329.    //menuitem wm3 -f -d \"$left(100 $url)\" webfix netscape $url
  1330.   //submenu wm wm1 "WebExplorer"
  1331.    //menuitem wm1 -f -d \"$left(100 $url)\" webfix webexplorer $url
  1332.   //submenu wm wm2 "Lynx"
  1333.    //menuitem wm2 -f -d \"$left(100 $url)\" exec -start LYNX $url
  1334.   //menuitem wm separator
  1335.   //submenu wm wmh "Add to URL Save File"
  1336.    //menuitem wmh -f -d \"$left(100 $url)\" addtofile $url
  1337.   //submenu wm wmc "Copy URL to clipboard"
  1338.    //menuitem wmc -f -d \"$left(100 $url)\" clipbrdput $url
  1339.  popupmenu wm
  1340.  }
  1341.  ^assign -url
  1342. }
  1343.  
  1344.  
  1345. ##LEFTOVER
  1346. alias makeaddusermenu {
  1347. menu -addusermenu
  1348. menu addusermenu
  1349.  menuitem addusermenu "Whois" {/wi $2}
  1350.  menuitem addusermenu "Adduser (manual)" {/adduser $2 $1 $"[ADDUSER] Enter Flags for "}
  1351.  menuitem addusermenu separator
  1352.  menuitem addusermenu "Adduser Help" {/help adduser}
  1353.  menuitem addusermenu "Userlevel Help" {/ghelp userlist}
  1354.  menuitem addusermenu separator
  1355.  menuitem addusermenu "All ChanOps +N" {/all.chops.n}
  1356.  submenu addusermenu idau "Adduser (Idented)"
  1357.   menuitem idau "+F" {/adduser $2 $1 +F}
  1358.   menuitem idau "+I" {/adduser $2 $1 +I}
  1359.   menuitem idau "+IV" {/adduser $2 $1 +IV}
  1360.   menuitem idau +"N" {/adduser $2 $1 +N}
  1361.   menuitem idau "+AFIO" {/adduser $2 $1 +AFIO}
  1362.   menuitem idau "+BFIOP" {/adduser $2 $1 +BFIOP}
  1363.   menuitem idau separator
  1364.   menuitem idau "+D" {/adduser $2 $1 +D}
  1365.   menuitem idau "+S" {/adduser $2 $1 +S}
  1366.   menuitem idau "+DS" {/adduser $2 $1 +DS}
  1367.  submenu addusermenu ndau "Adduser (Non Idented)"
  1368.   menuitem ndau "+FM" {/adduser $2 $1 +FM}
  1369.   menuitem ndau "+IM" {/adduser $2 $1 +IM}
  1370.   menuitem ndau "+IVM" {/adduser $2 $1 +IVM}
  1371.   menuitem ndau "+NM" {/adduser $2 $1 +IVM}
  1372.   menuitem ndau "+AFIOM" {/adduser $2 $1 +AFIOM}
  1373.   menuitem ndau "+BFIOPM" {/adduser $2 $1 +BFIOPM}
  1374.   menuitem ndau separator
  1375.   menuitem ndau "+DM" {/adduser $2 $1 +DM}
  1376.   menuitem ndau "+SM" {/adduser $2 $1 +SM}
  1377.   menuitem ndau "+DSM" {/adduser $2 $1 +DSM}
  1378.  ^set nick_menu_alt addusermenu Whois %s
  1379. }
  1380. makeaddusermenu
  1381.  
  1382. alias makecolormenu {
  1383. //menu -cc
  1384. //menu cc
  1385. //menuitem cc "* : Bold" {type }
  1386. //menuitem cc "_ : Underline" {type }
  1387. //menuitem cc separator
  1388. //menuitem cc "0 : Black" {type 00}
  1389. //menuitem cc "1 : Blue" {type 01}
  1390. //menuitem cc "2 : Green" {type 02}
  1391. //menuitem cc "3 : Cyan" {type 03}
  1392. //menuitem cc "4 : Red" {type 04}
  1393. //menuitem cc "5 : Magenta" {type 05}
  1394. //menuitem cc "6 : Yellow" {type 06}
  1395. //menuitem cc "7 : White" {type 07}
  1396. //menuitem cc -b "I : Inverse" {type }
  1397. //menuitem cc "/ : Default" {type }
  1398. //menuitem cc separator
  1399. //menuitem cc "8 : Dark Grey" {type 08}
  1400. //menuitem cc "9 : Bright Blue" {type 09}
  1401. //menuitem cc "A : Bright Green" {type 0A}
  1402. //menuitem cc "B : Bright Cyan" {type 0B}
  1403. //menuitem cc "C : Bright Red" {type 0C}
  1404. //menuitem cc "D : Bright Magenta" {type 0D}
  1405. //menuitem cc "E : Bright Yellow" {type 0E}
  1406. //menuitem cc "F : Bright White" {type 0F}
  1407. }
  1408. makecolormenu
  1409. alias targetmenu {
  1410.  menu -tm
  1411.  menu tm
  1412.  if (![$1]) {
  1413.   menuitem tm -s "Queried: $0    " #
  1414.  }{
  1415.   menuitem tm -s "nick: $0    " #
  1416.  }
  1417.  menuitem tm separator
  1418.  if (![$1]) {
  1419.   menuitem tm "Turn Log On" {//^window logfile $exedir/logs/$left(8 $strip(=\\*?<>|\"\' $T)).log;//window log on}
  1420.   menuitem tm "Turn Log off" //window log off
  1421.  }{
  1422.   menuitem tm "Talk Window" /talk $0
  1423.   menuitem tm "Chat Window" /chat $0
  1424.  }
  1425.  submenu tm tmi "Ignores" 
  1426.   menuitem tmi -d "Ignore (temp)" ig $0 -t 180 all
  1427.   menuitem tmi "Ignore (perm)" ig $0 -p all
  1428.   menuitem tmi "Unignore" unig $0 all
  1429.  //submenu tm tmo "Other"
  1430.   //menuitem tmo -d "Whois" whois $0
  1431.   //menuitem tmo "Server Whois" wii $0
  1432.   //menuitem tmo "Lookup" lookup $0
  1433.   //menuitem tmo separator
  1434.   //menuitem tmo "Ping" ping $0
  1435.   //menuitem tmo "Time" ctcp $0 TIME
  1436.   //menuitem tmo "UserInfo" ctcp $0 userinfo
  1437.   //menuitem tmo "Finger" ctcp $0 finger
  1438.   //menuitem tmo "Version" ver $0
  1439.  //submenu tm tmx "XDCC"
  1440.   //menuitem tmx -d "Req Pack List" msg $0 xdcc list
  1441.   //menuitem tmx separator
  1442.   for (@ _xidx = 1, _xidx <= 15, @ _xidx++) {
  1443.    //submenu tmx tmx$_xidx "Pack #$_xidx  "
  1444.    //menuitem tmx$_xidx "List" msg $0 xdcc list #$_xidx
  1445.    //menuitem tmx$_xidx -d "Send" msg $0 xdcc send #$_xidx
  1446.    //menuitem tmx$_xidx "ReSend" msg $0 xdcc resend #$_xidx
  1447.   }
  1448.  //menuitem tm "Send File(s)" senddialog $0
  1449.  //menuitem tm "ReSend File(s)" resenddialog $0
  1450.  //menuitem tm "Send Sound" dialogsound $0
  1451.  popupmenu tm
  1452.  ^assign -_xidx
  1453. }
  1454.  
  1455. alias makepopup {
  1456. @ gt.ppnick = [$1]
  1457. @ gt.ppchan = [$0]
  1458.  
  1459. menu -popup
  1460. menu popup
  1461.  //submenu popup md "$gt.ppnick"
  1462.   //menuitem md "Op     (+o)" {op $gt.ppnick}
  1463.   //menuitem md "DeOp   (-o)" {deop $gt.ppnick}
  1464.   //menuitem md "Voice  (+v)" {voice $gt.ppnick}
  1465.   //menuitem md "Quiet  (-v)" {quiet $gt.ppnick}
  1466. ##Add some cool ignore stuff here.
  1467.   //menuitem md "Ignore (temp)" {ig $gt.ppnick all}
  1468.   //menuitem md "Ignore (perm)" {ig $gt.ppnick -p all}
  1469.   //menuitem md "Unignore" {unig $gt.ppnick all}
  1470. ##Do it right
  1471.  //submenu popup nxdcc "XDCC"
  1472.   //menuitem nxdcc -d "Req Pack List" {msg $gt.ppnick xdcc list}
  1473.   //menuitem nxdcc separator
  1474.   for (@ _xidx = 1, _xidx <= 15, @ _xidx++) {
  1475.    //submenu nxdcc nx$_xidx "Pack #$_xidx  "
  1476.    //menuitem nx$_xidx "List" msg $gt.ppnick xdcc list #$_xidx
  1477.    //menuitem nx$_xidx -d "Send" msg $gt.ppnick xdcc send #$_xidx
  1478.    //menuitem nx$_xidx "ReSend" msg $gt.ppnick xdcc resend #$_xidx
  1479.   }
  1480.  
  1481.  //menuitem popup "Send File(s)" {senddialog $gt.ppnick}
  1482.  //menuitem popup "ReSend File(s)" {resenddialog $gt.ppnick}
  1483.  //menuitem popup "Send Sound" {dialogsound $gt.ppnick}
  1484.  if (gz.isoper()) {
  1485.   submenu popup popoper "Oper"
  1486.    menuitem popoper "Normal Kline" {kline $gt.ppnick}
  1487.    menuitem popoper "More options to be added later..." {
  1488.     gecho Non-identd, domain, temp, noident temp, and domain temp klines to
  1489.     gecho be added in next release
  1490.    }
  1491. #   menuitem popoper "Non-Identd Kline" {echo kline -i $gt.ppnick}
  1492. #   menuitem popoper "Domain Kline" {echo Domain Kline not implemented: $gt.ppnick}
  1493. #   menuitem popoper "Normal Temp Kline" {echo kline -t $gt.ppnick}
  1494. #   menuitem popoper "Non-Identd Temp Kline" {echo kline -t -i $gt.ppnick}
  1495. #   menuitem popoper "Domain Temp Kline" {echo kline -t -d $gt.ppnick}
  1496.  }
  1497.  
  1498.  //submenu popup popother "Other"
  1499.   //menuitem popother -d "Whois" {whois $gt.ppnick}
  1500.   //menuitem popother "Server Whois" {wii $gt.ppnick}
  1501.   //menuitem popother "Lookup" {lookup $gt.ppnick}
  1502.   //menuitem popother "Channel Idletime" {idle $gt.ppnick}
  1503.   //menuitem popother separator
  1504.   //menuitem popother "Talk (query)" {talk $gt.ppnick}
  1505.   //menuitem popother "Chat (dcc chat query)" {chat $gt.ppnick}
  1506.   //menuitem popother separator
  1507.   //menuitem popother "Ping" {ping $gt.ppnick}
  1508.   //menuitem popother "Time" {/ctcp $gt.ppnick TIME}
  1509.   //menuitem popother "UserInfo" {/ctcp $gt.ppnick userinfo}
  1510.   //menuitem popother "Finger" {/ctcp $gt.ppnick finger}
  1511.   //menuitem popother "Version" {ver $gt.ppnick}
  1512.  //menuitem popup separator
  1513.  //submenu popup kicks "Kicks"
  1514.   //menuitem kicks -d "Random Kick" {k $gt.ppnick}
  1515.   //menuitem kicks "McKick" {mck $gt.ppnick}
  1516.   //menuitem kicks "McKick (break)" {mcdk $gt.ppnick}
  1517.   //menuitem kicks "TacobellKick" {tbk $gt.ppnick}
  1518.   //menuitem kicks "BurgerKing Kick" {bkk $gt.ppnick}
  1519.   //menuitem kicks "KentuckyFried" {kfck $gt.ppnick}
  1520.   //menuitem kicks "CarlsJr Kick" {cjk $gt.ppnick}
  1521.   //menuitem kicks "TaeKwonLeap Kick" {tkl $gt.ppnick}
  1522.   //menuitem kicks "GreetKick" {gk $gt.ppnick}
  1523.   if (gz.extras) //menuitem kicks -b "PimpKick" {pimpkick $gt.ppnick}
  1524.   if (gz.extras) //menuitem kicks "PimpSlap" {pimpslap $gt.ppnick}
  1525.   if (gz.extras) //menuitem kicks "GerbilKick" {gerbilkick $gt.ppnick}
  1526.   if (gz.extras) //menuitem kicks "GimpKick" {gimpkick $gt.ppnick}
  1527.   if (gz.extras) //menuitem kicks "Stinkkick" {stinkkick $gt.ppnick}
  1528.   if (gz.extras) //menuitem kicks "LamahKick" {lamahkick $gt.ppnick}
  1529.   if (gz.extras) //menuitem kicks "Soup Kick" {soupkick $gt.ppnick}
  1530.  //submenu popup popban "Bans"
  1531.   //menuitem popban "Ban" {ban $gt.ppnick}
  1532.   //menuitem popban -d "Ban/Kick" {bk $gt.ppnick}
  1533.   //menuitem popban "Kick/Ban/Ignore" {kbi $gt.ppnick}
  1534.   //menuitem popban separator
  1535.   //menuitem popban "Screw Ban" {sban $gt.ppnick}
  1536.   //menuitem popban "Screw Ban/Kick" {sban $gt.ppnick;k $gt.ppnick}
  1537.   //menuitem popban "Screw Ban/Kick/Ignore" {sban $gt.ppnick;k $gt.ppnick;ig $gt.ppnick}
  1538.  //menuitem popup separator
  1539.  //submenu popup popnotify "Notify..."
  1540.   //menuitem popnotify "Add to Notify list" {/addnotify $gt.ppnick}
  1541.   //menuitem Popnotify "Remove from Notify List" {/unnotify $gt.ppnick}
  1542.   //menuitem popnotify "Show Notify List" {/shownotify}
  1543.  //submenu popup poppaste "Clipboard"
  1544.   //menuitem poppaste -d "Paste Formatted" {pasteto $gt.ppnick}
  1545.   //menuitem poppaste "Paste Optimized" {smartpaste $gt.ppnick}
  1546.  //menuitem popup separator
  1547.  //submenu popup actions "Actions"
  1548.   //submenu actions cluebats "ClueBats"
  1549.    //menuitem cluebats "Clue Bludgeon" {/me bludgeons $gt.ppnick with the cluebat}
  1550.    //menuitem cluebats "Lead ClueBat" {/me pulls out a lead cluebat, engraves $gt.ppnick's name on it, and swings wildly}
  1551.    //menuitem cluebats "Piñata" {/me strings $gt.ppnick up, puts on a blindfold, and declares a cluebat piñata party!!!}
  1552.    //menuitem cluebats "SuperMomoCluebat" {/me purchases a sUpErMoMo (tm) cluebat and pummels $gt.ppnick to the ground}
  1553.    //menuitem cluebats "Windows Cluebat" {/me finds the Windows edition Cluebat, taps it over $gt.ppnick's head, and watches it break}
  1554.   //menuitem actions separator
  1555.   //menuitem actions "Awake?" {/me pokes $gt.ppnick in the ribs ... you awake?}
  1556.   //menuitem actions "Backside" {/me calls attention to $gt.ppnick's backside}
  1557.   //menuitem actions "Booger" {/me flicks a booger at $gt.ppnick}
  1558.   //menuitem actions "Cookie Toss" {/me tosses $gt.ppnick a cookie... good boy}
  1559.   //menuitem actions "Curse" {/me wishes the fleas of a thousand camels upon $gt.ppnick's underwear drawer.}
  1560.   //menuitem actions "Fart" {/me farts in $gt.ppnick's general direction, clearing $gt.ppchan as well.}
  1561.   //menuitem actions "Finger" {/me gives $gt.ppnick the finger.  nInn}
  1562.   //menuitem actions "Glare" {/me glares at $gt.ppnick}
  1563.   //submenu actions ctacts -b "Cute Actions"
  1564.    //menuitem ctacts "Hug" {/me hugs $gt.ppnick ....}
  1565.    //menuitem ctacts "Pass Kiss" {/me Passionately Kisses $gt.ppnick}
  1566.    //menuitem ctacts "Hug/Kiss" {/me Hugs and Kisses $gt.ppnick}
  1567.    //menuitem ctacts "Dance" {/me takes $gt.ppnick in hand and Dances $rgenderex() around the channel}
  1568.    //menuitem ctacts "OZ-Hug" {/me gives $gt.ppnick a Big Ole Ozzie hug....}
  1569.    //menuitem ctacts "Rose" {/me drops to $gender knees and hands $gt.ppnick a long stemed rose @>->-`-,-->---}
  1570.    //menuitem ctacts "Snuggle" {/me snuggles up to $gt.ppnick ....}
  1571.   //menuitem actions separator
  1572.   //menuitem actions "HerringSlap" {/me slaps $gt.ppnick around a bit with an official sized #os/2 herring...}
  1573.   //menuitem actions "Noogie" {/me noogies $gt.ppnick}
  1574.   //menuitem actions "Nosepicker" {/me watches in disgust, as $gt.ppnick picks their nose}
  1575.   //menuitem actions "Slap" {/me slaps $gt.ppnick around a bit with a substantially large Brown Cow...}
  1576.   //menuitem actions "Moon" {/me drops $gender drawers and moons $gt.ppnick ( | )}
  1577.   //menuitem actions "PoopFace" {say Hey $gt.ppnick does the expression "Up your Bum PoopFace" Mean anything to you ??? :P}
  1578.   //menuitem actions "Rose" {/me tosses $gt.ppnick a rose @>--`-}
  1579.   //menuitem actions "Smurf" {/me points at $gt.ppnick and calls him a 09SMURF07}
  1580.   //submenu actions deaths -b "Deaths"
  1581.    //menuitem deaths "AK47" {/me pulls out $gender trusty AK47... nestles the sites squarely on $gt.ppnick's head... eases back on the trigger and empties a 30 round clip....BANG You're Dead}
  1582.   //menuitem actions separator
  1583.   //menuitem actions "Sneeze" {/me sneezes violently and a blob of snot lands on $gt.ppnick}
  1584.   //menuitem actions "Thwap" {/me thwaps $gt.ppnick upside the head...   \"Get with the program.\"}
  1585.   //menuitem actions "Tickle" {/me sneaks up behind $gt.ppnick ... tickle tickle tickle...}
  1586.   //menuitem actions "Wet Noodle" {/me pummels $gt.ppnick with a wet noodle}
  1587.   //menuitem actions "Whistle" {/me whistles with an innocent look on $gender face...}
  1588.   //menuitem actions "Win95 Torture" {/me handcuffs $gt.ppnick to a desk with Windows95 - "Multitask, bitch."}
  1589.   //menuitem actions "Vomit upon" {/me vomits repeatedly upon $gt.ppnick}
  1590.   //menuitem actions "Yucko" {/me slids over close to $gt.ppnick and gives them a nice slimey YUCKO !!!!}
  1591.   //submenu popup greets "Greets"
  1592.    //menuitem greets "moo" {say moo $gt.ppnick}
  1593.    //menuitem greets "\'lo" {say 'lo $gt.ppnick}
  1594.    //menuitem greets "heya" {say heya $gt.ppnick}
  1595.    //menuitem greets "what's up" {say what's up $gt.ppnick}
  1596.    //menuitem greets "re" {say re $gt.ppnick}
  1597.    //menuitem greets "hi" {say hi $gt.ppnick}
  1598.    //menuitem greets -b "Yo" {say Yo!! $gt.ppnick\!}
  1599.    //menuitem greets "hello" {say hello $gt.ppnick}
  1600.    //menuitem greets "Howdy" {say Howdy $gt.ppnick}
  1601.    //menuitem greets "\'sup?" {say \'sup $gt.ppnick\?}
  1602.    //menuitem greets "!!!!!" {say $gt.ppnick!!!!!}
  1603.    //menuitem greets "!@#\$\%\^" {say $gt.ppnick\!@#\$\%\^}
  1604.  //submenu popup byes "Byes"
  1605.   //menuitem byes "bye" {say bye $gt.ppnick}
  1606.   //menuitem byes "hastalapasta" {say hastalapasta $gt.ppnick}
  1607.   //menuitem byes "hastalabyebye" {say Hastalabyebye $gt.ppnick}
  1608.   //menuitem byes "wave" {/me waves bye to $gt.ppnick\.  \"Don't let the door hit you in the arse\"}
  1609.   //menuitem byes "See ya" {say See ya $gt.ppnick}
  1610.  if ([$loadacts]==[YES]) {
  1611.    /loadplug $actionsfile
  1612.  }
  1613. ^popupmenu popup
  1614. }
  1615.  
  1616.  
  1617. ^set -nick_menu
  1618.  
  1619. alias rctest {
  1620.  if (bmatch($lastclickline(3) *.ico *.iff *.pcd *.pcx *.tga *.pic *.png *.jpg *.gif *.tif *.bmp) && file.exist($lastclickline(3))) {
  1621.   menu -tmp
  1622.   menu tmp
  1623.   menuitem tmp "View File: $file.sanspath($lastclickline(3))" exec -start $imageviewer $lastclickline(3)
  1624.   popupmenu tmp
  1625. }
  1626.  else if (onchannel($lastclickline(4) $C)) {makepopup $C $lastclickline(4)}
  1627.  else if (lastclickline(4) == strip(= $T) && T != []) {targetmenu $lastclickline(4)}
  1628.  else if (match($lastclickline(4) $tk.msglist)) {targetmenu $lastclickline(4) noquery}
  1629.  else {windowlist}
  1630. }
  1631.  
  1632. ##POPUP MENUS
  1633.  
  1634.  
  1635.  
  1636.  
  1637. ##action plugin module support for GemZ 2.5
  1638. ##Format for the plugin file must be one line per //menuitem using
  1639. ## the following keyword format
  1640. ##"TITLE" TYPE TEXT GOES HERE
  1641. ##   Type Keywords are: %ACT, %PUB, %KICK or %CMD
  1642. ##   Other Keywords are %nk (nick) %pnk (possesive nick)
  1643. ##     and %ch (current channel)
  1644. ##   Comment lines must begin with a pound (#)
  1645. ##To create a new column in the //submenu, put %new as the second word
  1646. ##  followed by a Command keyword
  1647. ##%kick must have %nk following it immediately.
  1648. ##%cmd must be followed by a valid command... like /gimpkick
  1649.  
  1650. alias loadplug {
  1651.  @ pluginsloaded = 1
  1652.  ^set epic_parser off
  1653.  if ([$0] && [$fexist($0)]==[1]) {
  1654. #  makepopup
  1655.   //menuitem popup separator
  1656.   //submenu popup custact "Custom Actions"
  1657.   //submenu popup custkick "Custom Kicks"
  1658.   //submenu popup custcmd "Custom Command"
  1659.   @ _plugfile = open($0 R)
  1660.   while (!eof($_plugfile)) {
  1661.    @ ____bob++
  1662.    @ _tmp.p = [$strip(; $read($_plugfile))]
  1663.    if ([$left(1 $_tmp.p)]==["] && [$word(1 $_tmp.p)] != [%new]) {
  1664.     if ([$word(1 $_tmp.p)]==[%kick]) {
  1665.      //menuitem custkick \"$strip(\" $word(0 $_tmp.p))\" custout $_tmp.p
  1666.     }
  1667.     else if ([$word(1 $_tmp.p)]==[%cmd]) {
  1668.      //menuitem custcmd \"$strip(\" $word(0 $_tmp.p))\" custout $_tmp.p
  1669.     }
  1670.     else //menuitem custact \" $strip(\" $word(0 $_tmp.p))\" custout $_tmp.p
  1671.    }
  1672.    else if ([$left(1 $_tmp.p)]==[\"] && [$word(1 $_tmp.p)]==[%new] ) {
  1673.     @ _clen = [$#_tmp.p]
  1674.     @ _tmp.p = [$word(0 $_tmp.p) $ref(3-$_clen $_tmp.p)]
  1675.     if ([$word(1 $_tmp.p)]==[%cmd]) {
  1676.      //menuitem custcmd -b \"$strip(\" $word(0 $_tmp.p))\" custout $_tmp.p
  1677.     }
  1678.     else if ([$word(1 $_tmp.p)]==[%kick]) {
  1679.      //menuitem custkick -b \"$strip(\" $word(0 $_tmp.p))\" custout $_tmp.p
  1680.     }
  1681.     else //menuitem custact -b \"$strip(\" $word(0 $_tmp.p))\" custout $_tmp.p
  1682.     ^assign -_clen
  1683.    }
  1684.   }
  1685. #  ^set nick_menu popup %s
  1686.   @ close($_plugfile)
  1687.   ^assign -_tmp.p;^assign -_plugfile
  1688.  }{gecho No module specifed, or file does not exist}
  1689.  ^set epic_parser on
  1690. }
  1691.  
  1692. alias loadplug {
  1693.  @ pluginsloaded = 1
  1694.  if ([$0] && fexist($0)==[1]) {
  1695. #  makepopup
  1696.   //menuitem popup separator
  1697.   //submenu popup custact "Custom Actions"
  1698.   //submenu popup custkick "Custom Kicks"
  1699.   //submenu popup custcmd "Custom Command"
  1700.   @ _plugfile = open($0 R)
  1701.   while (!eof($_plugfile)) {
  1702.    @ _tmp.p = strip(; $read($_plugfile))
  1703.    if (left(1 $_tmp.p) == [#]) {}
  1704.    else if (word(1 $_tmp.p) == [%new]) {
  1705.     switch ($word(2 $_tmp.p)) {
  1706.      (%cmd) {//menuitem custcmd -b "$word(0 $_tmp.p)" custout $stripw(%new $_tmp.p)}
  1707.      (%kick) {//menuitem custkick -b "$word(0 $_tmp.p)" custout $stripw(%new $_tmp.p)}
  1708.      (%act) {//menuitem custact -b "$word(0 $_tmp.p)" custout $stripw(%new $_tmp.p)}
  1709.      (%pub) {//menuitem custact -b "$word(0 $_tmp.p)" custout $stripw(%new $_tmp.p)}
  1710.      (*) {}
  1711.     }
  1712.    }
  1713.    else {
  1714.     switch ($word(1 $_tmp.p)) {
  1715.      (%cmd) {//menuitem custcmd "$word(0 $_tmp.p)" custout $_tmp.p}
  1716.      (%kick) {//menuitem custkick "$word(0 $_tmp.p)" custout $_tmp.p}
  1717.      (%act) {//menuitem custact "$word(0 $_tmp.p)" custout $_tmp.p}
  1718.      (%pub) {//menuitem custact "$word(0 $_tmp.p)" custout $_tmp.p}
  1719.      (*) {}
  1720.     }
  1721.    }
  1722.   }
  1723.   @ close($_plugfile)
  1724.   ^assign -_tmp.p;^assign -_plugfile
  1725.  }{gecho No module specifed, or file does not exist}
  1726. }
  1727.  
  1728.  
  1729.  
  1730. alias custout {
  1731.  @ _co.n = strip(@+=\'\" $lastclickline(4))
  1732.  @ _co.c = C
  1733.  @ _co.i = 0
  1734.  fe ($*) _co.m {
  1735.   if (_co.i == 0) {}{@ _co.l #= [ ] ## _co.m}
  1736.   @ _co.i++
  1737.  }
  1738.  @ _co.w = word(1 $*)
  1739.  if (_co.w==[%act] || _co.w==[%pub] || _co.w==[%kick] || _co.w==[%cmd]) { 
  1740.   fe ($_co.l) _co.wd {
  1741.    if (_co.wd==[%act]) {@ _co.o #= [/me]}
  1742.    else if (_co.wd==[%pub]) {@ _co.o #= [/say ]}
  1743.    else if (_co.wd==[%kick]) {@ _co.o #= [/k ]}
  1744.    else if (_co.wd==[%cmd]) {@ _co.cmd = [true]}
  1745.    else if (_co.wd==[%nk]) {@ _co.o #= [ $_co.n]}
  1746.    else if (_co.wd==[%nk,]) {@ _co.o #= [ $_co.n\,]}
  1747.    else if (_co.wd==[%nk.]) {@ _co.o #= [ $_co.n\.]}
  1748.    else if (_co.wd==[%nk!]) {@ _co.o #= [ $_co.n\!]}
  1749.    else if (_co.wd==[%pnk]) {@ _co.o #= [ $_co.n\'s]}
  1750.    else if (_co.wd==[%ch]) {@ _co.o #= [ $_co.c]}
  1751.    else if (_co.cmd) {@ _co.o #= [$_co.wd]}
  1752.    else @ _co.o = [$_co.o $strip(; $_co.wd)]
  1753.   }
  1754.   eval $_co.o
  1755.   #gecho $_co.o
  1756.  }{gecho ERROR in plugin (2nd word not %act, %pub, %kick, %cmd)}
  1757.  purge _co
  1758. }
  1759.  
  1760.  
  1761. # New version, if this one doesn't work, resort to the above one by commenting this one out.
  1762. alias custout {
  1763.  @ _co.n = strip(@+=\'\" $lastclickline(4))
  1764.  @ _co.c = C
  1765.  @ _co.i = 0
  1766.  fe ($*) _co.w {
  1767.   @ _co.i++
  1768.   if (_co.i == 2) {if (match($_co.w %act %pub %kick %cmd)) {@ _co.ok = 1}{gecho Actplug error: Second "word" not %cmd %pub %kick or %cmd}}
  1769.   #ignore first "word"
  1770.   if (_co.i == 1) {}
  1771.   else if (_co.w==[%act]) {@ _co.o #= [/me ]}
  1772.   else if (_co.w==[%pub]) {@ _co.o #=[/say ]}
  1773.   else if (_co.w==[%kick]) {@ _co.o #=[/k ]}
  1774.   else if (_co.w==[%nk]) {@ _co.o #= [$_co.n ]}
  1775.   else if (_co.w==[%nk,]) {@ _co.o #= [$_co.n\, ]}
  1776.   else if (_co.w==[%nk.]) {@ _co.o #= [$_co.n\. ]}
  1777.   else if (_co.w==[%nk!]) {@ _co.o #= [$_co.n\! ]}
  1778.   else if (_co.w==[%pnk]) {@ _co.o #= [$_co.n\'s ]}
  1779.   else if (_co.w==[%ch]) {@ _co.o #= [$_co.c ]}
  1780.   else if (_co.w==[%ch,]) {@ _co.o #= [$_co.c\, ]}
  1781.   else if (_co.w==[%ch.]) {@ _co.o #= [$co.c\. ]}
  1782.   else if (_co.w==[%cmd]) {@ _co.cmd = 1}
  1783.   else {@ _co.o #= [$strip(; $_co.w) ]}
  1784.  }
  1785.  if (_co.ok) {eval $_co.o}
  1786.  purge _co
  1787. }
  1788.  
  1789.  
  1790. ###### OFFERLIST UTILITY #########
  1791. ##### Idea by Shprota, External Utility required is offers.exe
  1792. #####   offers.exe written by Shprota
  1793. ##### Offerlist irc code written by gemini
  1794. alias goffers {
  1795.  if (C) {
  1796.   purge offerlist;@ numoffers = 0;@ ousers = chanusers($C)
  1797.   @ _pp.idx = 0
  1798.   @ _pp.time = 0
  1799.   fe ($ousers) _pp {
  1800.    @ _pp.time++
  1801.    @ _pp.idx++
  1802.    if (bobtmp) {@ bobtmp = [$bobtmp]##[,$_pp]}{@ bobtmp = [$_pp]}
  1803.    if (_pp.idx == 15) {
  1804.     eval ^timer $_pp.time .send $bobtmp xdcc list
  1805.     @ _pp.idx = 0
  1806.     @ bobtmp = []
  1807.    }
  1808.   }
  1809.   window new level notices name NOTICEWINDOW;
  1810.   gecho All Notices being directed here;gecho Requesting Entire Channel Pack list...
  1811.   eval .send $bobtmp xdcc list
  1812.  }
  1813.  ^assign -bobtmp
  1814.  purge _pp
  1815. }
  1816.  
  1817. alias _addoffer {if (numoffers >= 75) {@ numoffers = 0};@ numoffers++;@ offerlist[$numoffers] = [$0-]}
  1818.  
  1819. on #-notice 66 * {
  1820.  if ([$match(*#* $1)]==[1]) {
  1821.  @ _wallchan = [$_chan($1)]
  1822.  if (!_wallchan) {
  1823.    _addoffer $0 $strip(# $1) $strip( $2-)
  1824.   }
  1825.  }
  1826.  if ([$match([gx] $1)]==[1] && [$match(*#* $2)]==[1]) {
  1827.    _addoffer $0 $strip(# $2) $strip( $3-)
  1828.  }
  1829.  ^assign -_wallchan
  1830. }
  1831.  
  1832. alias selectoffers {
  1833.  @ unlink($exedir/gzoff.tmp)
  1834.  @ unlink($exedir/gzout.tmp)
  1835.  @ theofferfile = open($exedir/gzoff.tmp W T D)
  1836.  foreach offerlist ii {
  1837.   @ write($theofferfile $offerlist[$ii])
  1838.  }
  1839.  @ close($theofferfile)
  1840.  ^assign -theofferfile
  1841.  exec -name selectoffers $exedir/offers.exe $exedir/gzoff.tmp $exedir/gzout.tmp
  1842.  ^on ^exec_exit "selectoffers *" {
  1843.   @ theinfile = open($exedir/gzout.tmp R)
  1844.   gecho Requesting Selected Files...
  1845.   while ([$eof($theinfile)]==[0]) {
  1846.    @ getthis = read($theinfile)
  1847.    if (getthis) {
  1848.     .send $word(0 $getthis) xdcc send \#$word(1 $getthis)
  1849.    }
  1850.   }
  1851.   @ close($theinfile)
  1852.   ^assign -getthis
  1853.   ^assign -theinfile
  1854.  }
  1855. }
  1856.  
  1857. alias clearofferlist {@ numoffers = 0;purge offerlist;gecho Cached Pack lists have been purged.}
  1858.  
  1859.  
  1860.  
  1861.  
  1862. #SETUP STUFF
  1863. if ((!gemzloaded) || (!gt.nspath)) {
  1864.  @ _ns.p = searchpath(netscape.exe $PATH)
  1865.  fec ($_ns.p) _ns.c {
  1866.  if ([$_ns.c]==[/]) {
  1867.   @ gt.nspath = [$gt.nspath]##[\\]
  1868.  }{
  1869.   @ gt.nspath = [$gt.nspath]##[$_ns.c]}
  1870.  }
  1871.  purge _ns
  1872. }
  1873.  
  1874. eval if (ch.sndvolume) {timer 0 snd.dovolume $ch.sndvolume}{timer 0 snd.dovolume 100}
  1875.  
  1876.