ChatScape

ChatScape's Official Chat Forum.
Home­Portal­Gallery­Calendar­FAQ­Search­Register­Memberlist­Usergroups­Log in
Post new topic   Reply to topicShare | 
 

 Channel Shortcut

View previous topic View next topic Go down 
AuthorMessage
Sonny



Posts: 4
Join date: 2008-04-10
Age: 17
Location: An Emotion Filled Graveyard

PostSubject: Channel Shortcut   Sat Oct 18, 2008 4:01 pm

Lets you make a shortcut for a channel, so you don't have to type /join #chatscape but instead could type /join cs.
Dan, i'm not changing the $input's diaf. I like them. ^-^
Don't plan on doing anything more w/ it. I might though, dunno yet.
Tell me if it has any errors. ;o
Code:

on *:start:{
  hmake Shortcuts 10
}
menu * {
  Chan Shortcuts:chan_ss
}
alias chan_ss { dialog -m c_s c_s }
dialog c_s {
  title "Channel Shortcuts"
  size -1 -1 157 90
  option dbu
  edit "", 1, 6 23 68 10
  box "Settings", 2, 3 4 77 63
  text "Actual Chan Name", 3, 7 13 47 8
  text "Chan Shortcut", 4, 6 44 48 8
  edit "", 5, 6 53 68 10
  button "Add Shortcut", 7, 23 33 35 9
  list 8, 92 23 60 52, sort size vsbar autohs
  box "Channel List", 9, 89 4 67 85
  edit "", 10, 3 78 77 11, read
  text "Channels", 11, 93 13 52 8
  button "Remove", 6, 92 76 26 11
  button "Join All", 18, 125 76 26 11
  text "Shortcut Name", 13, 4 69 45 8
  menu "Menu", 16
  item "Exit", 17, 16
  menu "Links", 12
  item "35k Chat", 14, 12
  item "ChatScape", 15, 12
}

on *:dialog:c_s:init:*:{
  If (!$hget(Shortcuts)) { hmake Shortcuts 10 }
  var %c 1
  while (%c <= $hget(Shortcuts,0).item) {
    did -a $dname 8 $+($chr(35),$hget(Shortcuts,%c).item)
    inc %c
  }
}
on *:dialog:c_s:sclick:*:{
  If ($did == 7) {
    If (!4did(1).text) && (!$did(5).text) { noop $input(Nothing Was Enterted,uwo,Error!) | halt }
    If (!$did(1).text) && ($did(5).text) { noop $input(You Need To Enter The Channels Name.,uwo,Error!) | halt }
    If ($did(1).text) && (!$did(5).text) { noop $input(You Need To Enter The Channels Shortcut.,uwo,Error!) | halt }
    If ($left($did(1).text,1) == $chr(35)) || ($left($did(5).text,1) == $chr(35)) { noop $input(You Don't Need To Specify The '#' Symbol.,uwo,Error!) | halt }
    Else {
      hadd -m Shortcuts $did(1).text $did(5).text
      did -a $dname 8 $+($chr(35),$did(1).text)
      did -r $dname 1,5
      noop $input(Your Shortcut Has Been Added,o,Settings)
    }
  }
  If ($did == 6) {
    If (!$did(8).seltext) { noop $input(You Didn't Select Anything To Delete,uwo,Error!) | halt }
    Else {
      hdel Shortcuts $remove($did(8).seltext,$chr(35))
      did -d $dname 8 $did(8).sel
      did -r $dname 10
    }
  }
  If ($did == 18) {
    var %j 1
    while (%j <= $did(8).lines) {
      join $did(8,%j)
      inc %j
    }
  }
  If ($did(8).sel) { did -ra $dname 10 $hget(Shortcuts,$remove($did(8).seltext,$chr(35))) }
}
on *:dialog:c_s:menu:*:{
  If ($did == 14) { run http://35kchat.com }
  If ($did == 15) { run http://ChatScape.net }
  If ($did == 17) { dialog -x $dname $dname }
}
on *:dialog:c_s:dclick:8:{ join $did(8).seltext }
alias join {
  If ($left($1,1) == $chr(35)) { join $1 }
  Else {
    var %i 1
    while (%i <= $hget(Shortcuts,0).item) {
      If ($1 == $hget(Shortcuts,$hget(Shortcuts,%i).item)) { join $+($chr(35),$hfind(Shortcuts,$1).data) }
      inc %i
    }
  }
}
Back to top Go down
View user profile http://www.35kchat.com
Nemesis
Admin


Posts: 71
Join date: 2008-03-03
Age: 27

PostSubject: Re: Channel Shortcut   Tue Oct 21, 2008 8:59 am

Rofl save your self space by just diabling buttons dumb dumb ;p and you should add more just saying.
Back to top Go down
View user profile http://chatscape.1talk.net
Sonny



Posts: 4
Join date: 2008-04-10
Age: 17
Location: An Emotion Filled Graveyard

PostSubject: Re: Channel Shortcut   Tue Oct 21, 2008 10:19 pm

FINE. lil cunt. afro
Back to top Go down
View user profile http://www.35kchat.com
 

Channel Shortcut

View previous topic View next topic Back to top 
Page 1 of 1

Permissions of this forum:You can reply to topics in this forum
ChatScape :: Everything mIRC! :: mIRC Snippets Section.-
Post new topic   Reply to topic