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.

Information from web

Requests for complete scripts or modifications/fixes for scripts you didn't write. Response not guaranteed, and no thread bumping!
Post Reply
T
TheOne1337
Voice
Posts: 5
Joined: Mon Aug 14, 2006 1:25 pm

Information from web

Post by TheOne1337 »

Hi
I have one PHP file in my server and it contains one line text. It is good in the way it is in the file so only thing what TCL has to do is:

When somebody says in channel !example then bot says text from PHP file to channel.


I don't have very good english, but i'll hope that somebody understands.

Best Regards
Bert
User avatar
caesar
Mint Rubber
Posts: 3778
Joined: Sun Oct 14, 2001 8:00 pm
Location: Mint Factory

Post by caesar »

Code: Select all

bind pub - !example my:example

proc my:example {nick uhost hand chan text} {
  set url "http://your.web.server/page.php"
  set token [::http::geturl $url]
  set content [::http::data $token]
  ::http::cleanup $content
  foreach line [split $content \n] {
    putserv "PRIVMSG $chan :$line"
  }
}
Something like this anyway. Use this as an example. Use the search function to find more examples related to this subject. If you (or anyone else) got any questions feel free to ask (just reply).
Once the game is over, the king and the pawn go back in the same box.
T
TheOne1337
Voice
Posts: 5
Joined: Mon Aug 14, 2006 1:25 pm

Post by TheOne1337 »

Big big big thanks! It worked perfectly.
m
monie089
Halfop
Posts: 76
Joined: Sat Jul 29, 2006 11:13 pm

Post by monie089 »

how can i make that tell the users online from a forum
New server irc.NintendoXG.com come and visit
User avatar
caesar
Mint Rubber
Posts: 3778
Joined: Sun Oct 14, 2001 8:00 pm
Location: Mint Factory

Post by caesar »

TheOne1337: You'r welcome.

monie089: in your case *erase* (using regsub for instance) the crap you don't want. Example:

Code: Select all

regsub -all {<[^>]+>|<} $content { } content
Use it (the code I've posted above) as an example. Use the search function to find other discutions on this subject.
Once the game is over, the king and the pawn go back in the same box.
m
monie089
Halfop
Posts: 76
Joined: Sat Jul 29, 2006 11:13 pm

Post by monie089 »

ok thanks
New server irc.NintendoXG.com come and visit
D
DJmart
Voice
Posts: 21
Joined: Wed Mar 08, 2006 8:32 pm

Post by DJmart »

How can I edit that so it PM's or notices the user?

Thanks.
r
r0t3n
Owner
Posts: 507
Joined: Tue May 31, 2005 6:56 pm
Location: UK

Post by r0t3n »

Change:

Code: Select all

putserv "PRIVMSG $chan :$line"
To:

For PM:

Code: Select all

putserv "PRIVMSG $nick :$line"
For Notice:

Code: Select all

putserv "NOTICE $nick :$line"
r0t3n @ #r0t3n @ Quakenet
J
Justdabomb2
Voice
Posts: 37
Joined: Fri Sep 29, 2006 7:16 pm
Location: United States of America

Game Stats

Post by Justdabomb2 »

nvm *edited*

I got help

~Thanks caesar
Yeah!
Post Reply