Jump to content

IRC Messenger


Guest LAS

Recommended Posts

alias messenger { if ($dialog(msg)) dialog -x msg msg | dialog -m msg msg }
alias contacts {
 if (!$dialog(msg)) { return }
 did -r msg 2
 var %i = 1
 while (%i <= $notify(0)) {
   if ($notify(%i).ison == $ture) { did -a msg 2 + $notify(%i) }
   elseif ($notify(%i).ison == $false) { did -a msg 2 - $notify(%i) }
   inc %i
 }
}
dialog msg {
 title "IRC Messenger"
 size -1 -1 112 140
 option dbu
 box "", 1, 2 2 108 136
 list 2, 6 8 100 114, size vsbar
 button "Add New Contact", 3, 6 124 101 10, flat
}
on *:dialog:msg:init:*:{
 dll mdx.dll SetMircVersion $version
 dll mdx.dll MarkDialog $dname
 dll mdx.dll SetColor $dname 2 text $rgb(0,0,0)
 dll mdx.dll SetColor $dname 2 textbg $rgb(255,255,255)
 dll mdx.dll SetColor $dname 2 background $rgb(255,255,255)
 dll mdx.dll SetFont $dname 2,3 15 500 Tahoma
 .contacts
 .timercontacts 0 5 /contacts
}
on *:dialog:msg:sclick:2:{ set -u5 %msg $did(2).seltext | set %msgt $left(%msg,1) | set -u5 %msg $remove(%msg,$left(%msg,1),$chr(32)) }
on *:dialog:msg:dclick:2:{ 
 if ($status == disconnected) { .echo -a - Not Login To Server. }
 elseif (%msgt == -) { .echo -a - %msg is not online. }
 else { .query -n %msg | .echo $window(%msg) IRC Messager 1.2 - Now Talking To %msg $+ . }
}
on *:dialog:msg:sclick:3:{ .messenadd }

alias messenadd { if ($dialog(msga)) dialog -x msga msga | dialog -mo msga msga }
dialog msga {
 title "Add New Contact"
 size -1 -1 136 38
 option dbu
 box "", 1, 2 2 130 34
 edit "", 2, 6 8 122 10, autohs
 button "Add", 3, 6 22 59 10, flat
 button "Remove", 4, 70 22 59 10, flat
}
on *:dialog:msga:init:*:{
 dll mdx.dll SetMircVersion $version
 dll mdx.dll MarkDialog $dname
 dll mdx.dll SetColor $dname 2 text $rgb(0,0,0)
 dll mdx.dll SetColor $dname 2 textbg $rgb(255,255,255)
 dll mdx.dll SetColor $dname 2 background $rgb(255,255,255)
 dll mdx.dll SetFont $dname 2,3,4 15 500 Tahoma
}
on *:dialog:msga:edit:2:{ set -u30 %new $did(2).text }
on *:dialog:msga:sclick:3:{ 
 .notify %new | did -r $dname 2
 if ($dialog(msg)) { contacts }
}
on *:dialog:msga:sclick:4:{ 
 .notify -r %new | did -r $dname 2
 if ($dialog(msg)) { contacts }
}

 

Now this is my first code for making and IRC Messager. Yes I know it uses notify, and yes I know the timer keeps running, I made it this way. And some credit goes to Neo for the idea. But, the code was made completely by me. cool.gif Also, sense I know how Tidy gives good and bad comments, I do expect all. Just please do not tell me how crappy I am or something like. Also this code works both for IRCD and IRCX..

Link to comment
Share on other sites

  • 3 weeks later...
  • 5 months later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...