This is the new home of the egghelp.org community forum.
All data has been migrated (including user logins/passwords) to a new phpBB version.


For more information, see this announcement post. Click the X in the top right-corner of this box to dismiss this message.

Help with sockets when converting mirc to tcl.

Old posts that have not been replied to for several years.
Locked
S
SamuelRight
Voice
Posts: 3
Joined: Wed Feb 02, 2005 6:48 pm

Help with sockets when converting mirc to tcl.

Post by SamuelRight »

I need help converting this mirc script to tcl. I do not have control of the webserver's php scripts, so I need the eggdrop to do the same thing the mirc did. No writing to txt.

Code: Select all

ALIAS something {
  sockopen something webserver.com 80
  echo opened
}
on *:JOIN:#channel: something
on *:PART:#channel: something
on *:SOCKOPEN:something: {
  var %users, %i = 0 | while $nick(#channel,%i)) { %users = $nick(#channel,0) | inc %i }
  sockwrite -n oa GET $+(/a/php/script/which/reads/the/number/of/nicks.php?count=,%users) HTTP/1.0   
  sockwrite -n something Host: webserver.com
  sockwrite something $crlf
  echo written something
  sockclose something
}

ALIAS NICKS {
  sockopen NICKS webserver.com 80
  echo opened
}
on *:JOIN:#channel: NICKS
on *:NICK: NICKS
on *:PART:#channel: NICKS
on *:SOCKOPEN:NICKS: {
  var %nicks, %i = 1 | while $nick(#channel,%i)) { %nicks = $addtok(%nicks,$chr(60) $+ $chr(117) $+ $chr(62) $+ $ifmatch $+ $chr(60) $+ $chr(47) $+ $chr(117) $+ $chr(62) $+ $chr(44),43) | inc %i }
  sockwrite -n NICKS GET $+(/a/php/script/which/reads/users.php?data=,%nicks) HTTP/1.0   
  sockwrite -n NICKS Host: webserver.com
  sockwrite NICKS $crlf
}
on *:SOCKOPEN: NICKS {
  var %users, %i = 0 | while $nick(#channel,%i)) { %users = $nick(#channel,0) | inc %i }
  sockwrite -n NICKS GET $+(/a/php/script/which/reads/the/number/of/nicks.php?count=,%users) HTTP/1.0   
  sockwrite -n NICKS Host: webserver.com
  sockwrite NICKS $crlf
}
Thanks.
User avatar
^DooM^
Owner
Posts: 772
Joined: Tue Aug 26, 2003 5:40 pm
Location: IronForge
Contact:

Post by ^DooM^ »

Have you read the TCL manual or even attempted to write this yourself?
The lifecycle of a noob is complex. Fledgling noobs gestate inside biometric pods. Once a budding noob has matured thru gestation they climb out of their pod, sit down at a PC, ask a bunch of questions that are clearly in the FAQ, The Noob is born
S
SamuelRight
Voice
Posts: 3
Joined: Wed Feb 02, 2005 6:48 pm

Post by SamuelRight »

I spent all afternoon looking at other scripts trying to make something work.

Would it look something like this?

Code: Select all

bind join - "$channel %" socker -webserver.com 
The manual is very overwhelming. I just need to host this script for a webserver, I have no patience trying to self learn tcl from scratch. :(
User avatar
Alchera
Revered One
Posts: 3344
Joined: Mon Aug 11, 2003 12:42 pm
Location: Ballarat Victoria, Australia
Contact:

Post by Alchera »

SamuelRight wrote: I have no patience trying to self learn tcl from scratch. :(
And we have no patience in helping those that will not help themselves.
Add [SOLVED] to the thread title if your issue has been.
Search | FAQ | RTM
S
SamuelRight
Voice
Posts: 3
Joined: Wed Feb 02, 2005 6:48 pm

Post by SamuelRight »

So, I need to take a tcl course to host a script? :roll:

I am just asking for some direction on the script, I do not even know where to look, nor do I know the tcl equivalent for the mirc commands used.
User avatar
Alchera
Revered One
Posts: 3344
Joined: Mon Aug 11, 2003 12:42 pm
Location: Ballarat Victoria, Australia
Contact:

Post by Alchera »

This forum (and site) is dedicated to eggdrop and the TCL scripts it uses, it's definitely not a mIRC scripting site. You'd be lucky to find one of us that could even come close to understanding that mIRC "language" let alone any one (if they did) bothering to re-write it into TCL. It's not generally something we do. Try using the Search button up top and using "socket" as your keyword; you might just get lucky. :wink:
Add [SOLVED] to the thread title if your issue has been.
Search | FAQ | RTM
User avatar
awyeah
Revered One
Posts: 1580
Joined: Mon Apr 26, 2004 2:37 am
Location: Switzerland
Contact:

Post by awyeah »

SamuelRight wrote:I spent all afternoon looking at other scripts trying to make something work.

Would it look something like this?

Code: Select all

bind join - "$channel %" socker -webserver.com 
The manual is very overwhelming. I just need to host this script for a webserver, I have no patience trying to self learn tcl from scratch. :(
This should be directed to a proc in my case:

Code: Select all

bind join - "#channelname" socker:webserver

proc socker:webserver {nick uhost hand chan} {
  #Not sure what this does though.
  socker -webserver.com
  #Put other stuff in here...
  ..............
  .............
  ...........
}
·­awyeah·

==================================
Facebook: jawad@idsia.ch (Jay Dee)
PS: Guys, I don't accept script helps or requests personally anymore.
==================================
Locked