Jump to content

Daktyl198

Members
  • Posts

    7
  • Joined

  • Last visited

Daktyl198's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Is this even possible, short of using a command to view and parse the access list? I wanted to make a few of the PHP Bot commands available to only ops and above, so that means access level >= 5. Thanks in advance for any and all help you can give me
  2. fwrite($socket, "JOIN :#channel channelkey\r\n"); The above code works perfectly for any channel without a key... I'll try without the colon. It works!! To think it was something so simple O__O Thanks guys Edit: I just noticed AbraCadaver's first post said "don't". This could have been solved in the first reply haha
  3. No, that's to join the channel "#channel;" including the ; in the channel name. Looking at that, it seems like my code: fwrite($socket, "JOIN :#channel channelkey\r\n"); would be the right answer... Yet I get an error
  4. I'm stuck here... I can make the bot do pretty much everything BUT join channels with keys. From what I've read, joining a channel with a key is just the usual join command with the key following the channel name, e.g: fwrite($socket, "JOIN :#channel channelkey\r\n"); But that fails and tells me that there are invalid characters in the channel name; I'm assuming that means the space and everything that comes after it... So how do I get it to join a channel with a key and not bug out?
  5. Perfect! I'm pretty sure I can figure out how to make it modular myself Thanks for clearing up which functions to use~
  6. Which function should I use to connect to the server [sockets_connect vs fsocketopen], which function I should use after to send data to the server [fswrite vs fsputs], and how to pass a PING/PONG test. Those three pieces of info should send me on my way
  7. I'd like to start off by saying that I'm pretty much a newbie when it comes to PHP. I've had more experience in it than any other scripting/programming languages though, so I wish to use it for my needs. I've been googling away for the past two weeks or so trying to find a basic PHP IRC bot script that can connect to an IRC server, pass a ping/pong, and join more than one channel. I'd also like the functions to be modular (in a ./commands folder or something). But even with all that googling I don't know what to do. I've only come across older scripts that don't mention PING at all (not to mention that none of them can seem to agree on how to actually connect to the server [sockets_connect vs fsocketopen] and how to do things after [fswrite vs fsputs]) So I come asking for help with a very, very basic script that will pass a PING/PONG, be able to join more than one channel, and that can load !trigger or .trigger functions from single-file .php modules in a subfolder. Even if I somehow figure out to connect and join channels, the "read each line in the channel and load modular triggers and functions" part is probably way out of my league
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.