Jump to content

The Gate Keeper

Members
  • Posts

    1,465
  • Joined

  • Last visited

Everything posted by The Gate Keeper

  1. what are the commands you type to get the list...? what is returned...? These questions need to be asked so i can parse the information for you.
  2. depends on how you have them stored as "registered"...
  3. does it work though? of course i didn't test it, just code it, so you need to tell us the result.
  4. <?php include("header.php"); error_reporting(E_ALL ^ E_NOTICE); $botnick = "Chatterup"; $server = "chatterup.webhop.net"; $port = "6667"; $category = "GN"; ?> <html> <head> <meta http-equiv="Content-Language" content="en"> <meta name="GENERATOR" content="Microsoft FrontPage 5.0"> <meta name="ProgId" content="FrontPage.Editor.Document"> <meta http-equiv="Content-Type" content="text/html; charset=windows-1252"> <title>Room List</title> </head> <body> <table width="98%" border="0" align="center" cellpadding="0" cellspacing="0" id="AutoNumber1" style="border-collapse: collapse"> <tr> <td width="8%" height="20" align="center" valign="middle" bgcolor="#FFFFCC" style="border-left:1px solid #333333;border-bottom:1px solid;border-top:1px solid #333333;FONT-FAMILY: verdana;FONT-SIZE: 8pt;TEXT-DECORATION: none;"> Users</td> <td width="15%" height="20" align="left" valign="middle" bgcolor="#FFFFCC" style="border-bottom:1px solid;border-top:1px solid #333333;FONT-FAMILY: verdana;FONT-SIZE: 8pt;TEXT-DECORATION: none;"> Roomname:</td> <td width="77%" height="20" align="left" valign="middle" bgcolor="#FFFFCC" style="border-right:1px solid #333333;border-top:1px solid #333333;FONT-FAMILY: verdana;FONT-SIZE: 8pt;TEXT-DECORATION: none;"> Topic:</td> </tr> <?php $fp = fsockopen($server, $port, $errno, $errstr, 30); if (!$fp) { echo "$errstr ($errno)<br />\n"; } else { fputs($fp,"USER $botnick $botnick 127.0.0.1 :php\n"); $nick = $botnick . rand(10000,99999); fputs($fp,"NICK $nick\n"); while (!feof($fp)) { usleep(50); $fget = @fgets($fp, 128); //echo "$fget <br>\n"; $match = explode(" ", $fget); $fget = ereg_replace ("\n", "", $fget); $fget = ereg_replace ("\r", "", $fget); if ($match[1] == "001") { fputs($fp,"LIST\n"); } else if ($match[0] == "PING") { fputs($fp, "PONG " . $match[1]); } else if ($match[1] == "433") { $nick = $botnick . rand(10000,99999); fputs($fp,"NICK $nick\n"); } else if ($match[1] == "323") { fputs($fp, "QUIT :bye!\n"); break; } else if ($match[1] == "322") { $match[3] = ereg_replace ("#", "", $match[3]); if (eregi ("\[$category\](.*)", $match[3], $chan)) { $topic = explode(":", $fget); unset($topic[0]); unset($topic[1]); $topic = implode(":", $topic); if ($color == "FBFBF7") { $color = "FFFFFF"; } else { $color = "FBFBF7"; } ?> <tr> <td width="8%" align="center" valign="middle" bgcolor="#<?php echo $color; ?>" style="border-top:1px solid #333333;border-left:1px solid #333333;border-bottom:1px solid #333333;FONT-FAMILY: verdana;FONT-SIZE: 8pt;TEXT-DECORATION: none;"><?php echo $match[4]; ?></td> <td width="15%" style="border-bottom:1px solid #333333;bordertop:1px solid #333333;border-top:1px solid #333333;FONT-FAMILY: verdana;FONT-SIZE: 8pt;TEXT-DECORATION: none;" bgcolor="#<?php echo $color; ?>"> <a href="http://chatterupchat.webhop.org/chat/channel.aspx?value=<?php echo '[' . $category . ']' . $chan[1]; ?>&member=XS803m"> <?php echo $chan[1]; ?> </a></td> <td width="77%" style="border-right:1px solid #333333;border-bottom:1px solid #333333;FONT-FAMILY:;border-top:1px solid #333333; verdana;FONT-SIZE: 8pt;TEXT-DECORATION: none;"bgcolor="#<?php echo $color; ?>"> <?php echo $topic; ?></td> </tr> <?php } } } fclose($fp); } ?> </table> </body> </html> I changed $channel variable to $category so it made more sense, and modified the regular expression where it "parses" the channel name. You had it "parsing" everything after "GN", which is incorrect, you want to parse everything after "[GN]", which is represents the category you want. So i modified the "link" so that it wasn't based on GN, but based on $category.
  5. sorry DJ, but i doubt anyone here knows. You may need to try and find a forum specifically focused at the software you are using. That could be hard to find, but try and google it, you may come across something which could help you out. We here are more directed towards mIRC (when it comes to IRC), rather then the actual task of setting up an IRC. Though, we would love for you to stick around in the event others run into the same issues you have experienced, so that you can help out.
  6. if you have the problem fixed, perhaps you can post the result to allow others who may be in your predicament to try your solution? Guys, this is a forum, we are here to learn, and teach. However, as some have suggested, a level of knowledge is somewhat expected when questions of greater difficulty are asked, such as what you have requested. We try our best to lead you in the right direction, and we may not always be able to provide the final state that you need, but the idea should be enough to get any experienced/knowledgeable person over the line.
  7. you referring to mIRC? If so, then you can use mdx or dcx. not sure with dcx, but with mdx, its part of the dialogs.mdx stuff.
  8. yea, there are ones listed, but none of us are really bothered to make one to ensure it works for you. please pick one, try and adapt it, and see if it works. there is another user working on the same problem as you right now, so see what they are doing. perhaps you can collaborate?
  9. all i can think of is that it has something to do with the join command. try working on it a bit, perhaps the php code isn't working too well with it?
  10. interesting point joshR. However, you should probably add a note to say that you have used it. There are instances where a custom msg alias would be better, or would have been used, such as a custom theme, or a emoticon interface (web chat). Sorry if it may seem like i'm "clueless" on some of these new things, but from memory, i don't recall ! ever being used back in the days of GuarDDog. I was mIRC scripting since back in the days of mIRC 6.03, up to 6.16. So its been some time.
  11. in relation to the properties of a command such as echo... where you pass parameters, the order does not make a difference. Doing echo -st is the same as doing echo -ts, doing it with -iN is the same as doing -siNt or -iNst or -stiN. You only need to meet the requirements of the actual parameters, not the order of them. Any language should be able to comprehend the order on its own, and if it requires a specific ordering, it will tell you. I understand your aspect of keeping the code "clear", but ultimately, if you are developing something, you read it one way, someone else may read it differently, but the end result should/will be the same. doing other languages, you'll learn (as travis said), there are a lot of ways to do things, and some more effective then others. Languages on their own are powerful, but creativity and intuitiveness takes it a lot further. PS. why would you use ! in the !.msg? From the mIRC help file "If you want to perform a command without it being processed as an alias, you can prefix it with a ! exclamation mark.". Just asking to gather your reasoning for doing this...
  12. one of our coders... I've got to tell you, there isn't much that you can do but learn the languages that you are utilizing.
  13. it would depend on the java applet... You need to see how to join rooms with your java applet (or whatever you use), and go from there.
  14. modified previous post. Sorry. Added: what languages do you know? If you've learn a traditional/more commericalized language such as C/C++/C#/Java, php should come to you in a snap. And even mIRC...
  15. if you are going to be doing this, you should learn php, learn IRC, and in general, learn to program. the problems with the code seems to just be some small syntactical issues... try... <?php $botnick = "Chatterup"; $server = "chatterup.webhop.net"; $port = "6667"; $channel = ""; ?> <html> <head> <meta http-equiv="Content-Language" content="en"> <meta name="GENERATOR" content="Microsoft FrontPage 5.0"> <meta name="ProgId" content="FrontPage.Editor.Document"> <meta http-equiv="Content-Type" content="text/html; charset=windows-1252"> <title>Room List</title> </head> <body> <table width="98%" border="0" align="center" cellpadding="0" cellspacing="0" id="AutoNumber1" style="border-collapse: collapse"> <tr> <td width="8%" height="20" align="center" valign="middle" bgcolor="#FFFFCC" style="border-left:1px solid #333333;border-bottom:1px solid;border-top:1px solid #333333;FONT-FAMILY: verdana;FONT-SIZE: 8pt;TEXT-DECORATION: none;"> Users</td> <td width="15%" height="20" align="left" valign="middle" bgcolor="#FFFFCC" style="border-bottom:1px solid;border-top:1px solid #333333;FONT-FAMILY: verdana;FONT-SIZE: 8pt;TEXT-DECORATION: none;"> Roomname:</td> <td width="77%" height="20" align="left" valign="middle" bgcolor="#FFFFCC" style="border-right:1px solid #333333;border-top:1px solid #333333;FONT-FAMILY: verdana;FONT-SIZE: 8pt;TEXT-DECORATION: none;"> Topic:</td> </tr> <?php $fp = fsockopen($server, $port, $errno, $errstr, 30); if (!$fp) { echo "$errstr ($errno)<br />\n"; } else { fputs($fp,"USER $botnick $botnick 127.0.0.1 :php\n"); $nick = $botnick . rand(10000,99999); fputs($fp,"NICK $nick\n"); while (!feof($fp)) { usleep(50); $fget = @fgets($fp, 128); echo "$fget <br>\n"; $match = explode(" ", $fget); $fget = ereg_replace ("\n", "", $fget); $fget = ereg_replace ("\r", "", $fget); if ($match[1] == "001") { fputs($fp,"LIST\n"); } else if ($match[0] == "PING") { fputs($fp, "PONG :" . $match[1]); } else if ($match[1] == "433") { $nick = $botnick . rand(10000,99999); fputs($fp,"NICK $nick\n"); } else if ($match[1] == "323") { fputs($fp, "QUIT :bye!\n"); break; } else if ($match[1] == "322") { $match[3] = ereg_replace ("#", "", $match[3]); if (eregi ("$channel(.*)", $match[3], $chan)) { $topic = explode(":", $fget); unset($topic[0]); unset($topic[1]); $topic = implode(":", $topic); if ($color == "FBFBF7") { $color = "FFFFFF"; } else { $color = "FBFBF7"; } ?> <tr> <td width="8%" align="center" valign="middle" bgcolor="#<?php echo $color; ?>" style="border-top:1px solid #333333;border-left:1px solid #333333;border-bottom:1px solid #333333;FONT-FAMILY: verdana;FONT-SIZE: 8pt;TEXT-DECORATION: none;"><?php echo $match[4]; ?></td> <td width="15%" style="border-bottom:1px solid #333333;bordertop:1px solid #333333;border-top:1px solid #333333;FONT-FAMILY: verdana;FONT-SIZE: 8pt;TEXT-DECORATION: none;" bgcolor="#<?php echo $color; ?>"> <a href="./chat.php?action=Chat&rmname=[EN]<?php echo $chan[1]; ?>"> <?php echo $chan[1]; ?> </a></td> <td width="77%" style="border-right:1px solid #333333;border-bottom:1px solid #333333;FONT-FAMILY:;border-top:1px solid #333333; verdana;FONT-SIZE: 8pt;TEXT-DECORATION: none;"bgcolor="#<?php echo $color; ?>"> <?php echo $topic; ?></td> </tr> <?php } } } fclose($fp); } ?> </table> </body> </html>
  16. http://www.tg007.net/forum/index.php?showtopic=2538 please do a search next time, there are quite a few topics about on this.
  17. you cannot just do... var %red = 255,0,0 $rgb(%red) the reason is that it sees %red as a string, and doesn't recognise you have the commas there for it. You actually need to do something like... var %r = 255, %g = 0, %b = 0 $rgb(%r,%g,%b) This will work. So what i would suggest is using the above code and just change the values to a $gettok version so that you can get it from your ini file. I would suggest using a while loop and a readini with n value, instead of the actual name (i believe you can scan like that from memory, just check the help file).
  18. just use something like paint, and do colour selector, then you should be able to see their RGB values.
  19. no worries. we are all here to help and we are glad that you are taking what we say onboard. We don't mind explaining if we know that it does not fall on deaf ears (as the expression goes). PS. and yes, my name is David.
  20. it is true that this may not be a very "clean" way to do it, but i believe that it is the most efficient as you do everything in 1 ini command, instead of doing it in several mIRC commands including ini and gettok. In my opinion this is probably the best method.
  21. ok... you need to understand "$readini" a tad better. Looking at the help file... $readini(filename, [np], section, item) So..., in this case... filename is file, don't worry about the np switch, section is the section of the ini you want to look at, in this case "protection", now for the item, looking at the way you do the writeini, your item is $chan/$active, and not the protection name. So, your code should look like this... $readini($_prots,Protection,$active), which will then return the line in the ini file for the active channel, so for #err0rtest, it would return Revenge=1,Profanity=1. Being that that is what you get back, you should then use a comparison of $findtok to find whether or not your code the protection is correct. Looking at the help file... $findtok(text,token,N,C) text = the string you want to look through. token = the string you are trying to find, an example is Profanity=1 n = the token you want, as in, if there are several instances, you can find the first or the second or the third or the <nth> token. C = the character that is the tokenizer, the numeric representation of it that is. So for comma, its 44. $findtok will return the position of the token. Or $null if it doesn't exist. Linking it all together we have $findtok(text, Profanity=1, 1, 44), and the text would be what you get from the $readini. So... $findtok($readini($_prots,Protection,$active), Profanity=1, 1, 44). Hopefully this will get you quite the way through. I can't be too sure if this is right, been quite some time.
  22. you got to remember though, DCX doesn't use any dialog controls what so ever. So the fact you have to do all that code, you need to remember that you aren't doing any dialog code at all, so for the sacrifice of one, you benefit in the other.
  23. i believe he is talking about a flood protection, not a script to cause this. If that is the case, please say and we'll try and assist. Though, do you know anything about scripts? As in, do you run one yourself or not? just so we know where we are going here before we started feeding you code that you have no idea how to use.
  24. its basically another user that sits in the room you want it to, to perform a lot of the automated processes such as kicking, trivia, etc. And leaves your account for you to chat through.
×
×
  • Create New...