Chat Socket Client

By rikkeh on Aug 19, 2009

I didn't make the client, but ive been working on the server side part for a while, So far I have registering nicks, /oper ID PASS, /gline and /kill and all fully work.

100% credits to who ever made the client

I will throw a few things on the Client such as a nick list.

dialog chat_client {
  title "Chat through sockets"
  size -1 -1 185 120
  option dbu
  button "Connect", 2, 7 6 37 12
  button "Disconnect", 3, 48 6 37 12
  edit "", 4, 5 28 170 67, multi, hsbar, vsbar
  edit "", 5, 6 97 123 10, multi
  button "Submit", 7, 138 97 37 10

}
alias chatclient {
  dialog -md chat_client chat_client
}
on *:DIALOG:chat_client:close:0: {
  .bye
}
on *:DIALOG:chat_client:sclick:2: {
  .chat
}
on *:DIALOG:chat_client:sclick:3: {
  .bye
}
on *:DIALOG:chat_client:sclick:7: {
  if ($len($did(5).text) >= 1) {
    talk $did(5).text $crlf
    did -r chat_client 5
  }
}

alias chat { sockopen parser 69.47.131.146 80 }
on *:sockopen:parser:sockwrite -n parser CONNECTED $me 
on *:sockread:parser:{
  var %s
  sockread %s
  did -a chat_client 4 %s $crlf
}
alias talk {
  sockwrite -nt parser $me - $1-
}
alias bye { 
  sockwrite -nt parser QUIT $me  
  sockclose parser 
}

Comments

Sign in to comment.
rikkeh   -  Aug 21, 2009

Have any of you connected to the ip thats already on it, that would be what im working on with it right now. and the "on *:sockopen:parser:sockwrite -n parser CONNECTED $me $time $server "

Isn't needed because It sends that to the server and lets everyone know who connected.

Oh and why use $Server ?

 Respond  
Spanky   -  Aug 21, 2009

o.o well rate it then. dont just say you are -.-

 Respond  
D2K7   -  Aug 20, 2009

lol i rate it 7/10 :D Because i find it Usefull

 Respond  
Korvin   -  Aug 20, 2009

dude. if youre going to say 5/10 atleast actually rate it.

 Respond  
D2K7   -  Aug 20, 2009
 alias chat { sockopen parser 69.47.131.146 80 }
on *:sockopen:parser:sockwrite -n parser CONNECTED $me 
on *:sockread:parser:{
 alias chat { sockopen parser Ip/server port }
on *:sockopen:parser:sockwrite -n parser CONNECTED $me $time $server 
on *:sockread:parser:{ 

???

Good code 5/10 :D

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