mIRC Home    About    Download    Register    News    Help

Print Thread
#49153 13/09/03 11:38 AM
Joined: Aug 2003
Posts: 36
D
Ameglian cow
OP Offline
Ameglian cow
D
Joined: Aug 2003
Posts: 36
I have a plan, but i have problems thinking over how to get this done....


A dialog for the clients, without opening a server sonnection, but with sockets, connects to an irc network and in a channel, as if they just was with the defauld mIRC, anybody, that has an idear for how ro get started ???

please respond


TotalIRC the place to be

TuX.TotalIRC.net:6667

#TotalIRC
Joined: May 2003
Posts: 2,265
P
Hoopy frood
Offline
Hoopy frood
P
Joined: May 2003
Posts: 2,265
Code:
alias sockbot {
  hadd -m sockbot nick $2
  sockopen sockbot. [ $+ [ $hget(sockbot,nick) ] ] $1 $iif($3,$3,6667)
}
on *:sockopen:sockbot.*:{
  if ($sockerr) { return }
  echo -s Sockbot Connected!
  sockwrite -n $sockname nick $hget(sockbot,nick)
  sockwrite -n $sockname user sock . . sock
}
on *:sockread:sockbot.*:{
  if ($sockerr) { return }
  if ($1 == ping) { sockwrite -n $sockname PONG $remove($2,:) }
}
on *:sockclose:sockbot.*:{
  hfree sockbot
  echo -s Sockbot Disconnected!
}

/sockbot <server> <nickname> <port>
this should keep it connected smile.


new username: tidy_trax
Joined: Aug 2003
Posts: 36
D
Ameglian cow
OP Offline
Ameglian cow
D
Joined: Aug 2003
Posts: 36
yeah, bot how do they join a channel ???, and reseeve text, without needing a bot there ???

nice work there smile


TotalIRC the place to be

TuX.TotalIRC.net:6667

#TotalIRC
Joined: Dec 2002
Posts: 397
A
Fjord artisan
Offline
Fjord artisan
A
Joined: Dec 2002
Posts: 397
im kinda interested in this script now beacuse i have ideas that could make my script better i just need to figur out how can i make it so after it gets the first ping pong to join the channel #matrixnet and as its in their echo messages to a dialog or and @window...... any one help plz? confused


Need amazing web design for low price: http://www.matrixn3t.net
Joined: Aug 2003
Posts: 36
D
Ameglian cow
OP Offline
Ameglian cow
D
Joined: Aug 2003
Posts: 36
thats my plan aswell, but a dialog would be better...
Does anybody have a idear on how to get this to work ??



TotalIRC the place to be

TuX.TotalIRC.net:6667

#TotalIRC
Joined: May 2003
Posts: 2,265
P
Hoopy frood
Offline
Hoopy frood
P
Joined: May 2003
Posts: 2,265
if you use that script the commands are kind of the same as usual:
/sockwrite -n sockbot.* JOIN <#channel>
/sockwrite -n sockbot.* PART <#channel>
/sockwrite -n sockbot.* PRIVMSG <#channel> <message>
/sockwrite -n sockbot.* NICK <nick>
/sockwrite -n sockbot.* QUIT <message>
etc
to get the joins/parts etc:
on *:sockread:sockbot.*:{
sockread %s
tokenize 32 %s
if ($sockerr) { return }
if ($1 == ping) {
sockwrite -n $sockname PONG $remove($2,:)
}
echo -s $1-
}
that will echo what the socket reads, but you have to do the parsing yourself.


new username: tidy_trax
Joined: Aug 2003
Posts: 36
D
Ameglian cow
OP Offline
Ameglian cow
D
Joined: Aug 2003
Posts: 36
Thank you very much, i have the full idear now smile thx



TotalIRC the place to be

TuX.TotalIRC.net:6667

#TotalIRC
Joined: Aug 2003
Posts: 36
D
Ameglian cow
OP Offline
Ameglian cow
D
Joined: Aug 2003
Posts: 36
just 1 question, how would it resive text from the channel ??


TotalIRC the place to be

TuX.TotalIRC.net:6667

#TotalIRC
Joined: Aug 2003
Posts: 36
D
Ameglian cow
OP Offline
Ameglian cow
D
Joined: Aug 2003
Posts: 36
and how would i reseve text from a channel ???
and how will i know who is on channel ??

.... ?¿ <<-- me right now


TotalIRC the place to be

TuX.TotalIRC.net:6667

#TotalIRC
Joined: May 2003
Posts: 2,265
P
Hoopy frood
Offline
Hoopy frood
P
Joined: May 2003
Posts: 2,265
when you join a channel you get a /names reply to the socket, you can get the nicknames from there, you can either create a fairly big sockbot and make it so u can use it on its own, or make a small one where its only useable in the same channel as you.
use the echo -s $1- to figure out text, on very few servers its different to most..


new username: tidy_trax

Link Copied to Clipboard