Author Topic: please help with bot?  (Read 6924 times)

Swan

  • Newbie
  • *
  • Posts: 4
please help with bot?
« on: September 28, 2008, 02:15:15 PM »
Hi guys,

I recently made a VERY basic php bot for IRC (icechat client). Its current features stand at:

1) logging in
2) echoing a message

and....

thats it :(

What a loser

I am really wanting to flesh out my bot and make it far more useful, things such as the ability to kill users with a special code word, logging etc. I am not asking for anyone to code the stuff for me (though Id appreciate it!) but I would be VERY grateful if people could direct me as to the best place(s) to learn all the different possibilties that a bot could be used for. Does icechat come with a specific manual, or should i rely on any IRC manual to code? I am a total novice when it comes to IRC...that said I am very willing to learn.

Any guidance, any at all, much appreciated.

Snerf

  • Administrator
  • Hero Member
  • *****
  • Posts: 1968
    • IceChat IRC Client
Re: please help with bot?
« Reply #1 on: September 28, 2008, 04:29:10 PM »
This website has a lot of stuff in the "Scripting" section, have a look through there.
And of course these forums have a lot of things that ppl have posted.

And your always welcome to ask in the #icechat help channel on Quakenet, a lot of scripters hang out there.
The IceChat God

Swan

  • Newbie
  • *
  • Posts: 4
Re: please help with bot?
« Reply #2 on: September 28, 2008, 07:17:20 PM »
Sub ONJOIN(Nickname,Host,Channel,ServerNumber)
SendCommand "/echo Welcome, Nickname to the channel! :)",ServerNumber
End Sub


Whenever anyone connect to the channel in question the message displayed is:

Welcome, Nickname to the channel! :)

I am wanting Nickname to equal the nickname actually used by the member who has just joined. if bill joins

Welcome, bill to the channel! :)

Thanks

DarkStar

  • Full Member
  • ***
  • Posts: 135
  • Scripts for Praise
    • CorpseCorp
Re: please help with bot?
« Reply #3 on: September 28, 2008, 07:23:53 PM »
Code: [Select]
Sub ONJOIN(Nickname,Host,Channel,ServerNumber)
SendCommand "/echo Welcome, " & Nickname & " to the channel! Smiley",ServerNumber
End Sub
This message brought to you by the Wonderful Wizard of Oz.

Swan

  • Newbie
  • *
  • Posts: 4
Re: please help with bot?
« Reply #4 on: September 29, 2008, 05:22:50 AM »
Hi again, sorry guys..I am wanting to cut my teeth on conditional statements.



Code: [Select]
Sub ONQUERY(Message,Nickname,Host,ServerNumber)

if Nickname=Swan then

SendCommand "/echo " & Nickname & " My master has nothing to say to you.",ServerNumber

end if
End Sub

I get no errors....only thing is, the script doesnt work either. Also wondering what is the purpose of the ampersand (&) symbol?

Snerf

  • Administrator
  • Hero Member
  • *****
  • Posts: 1968
    • IceChat IRC Client
Re: please help with bot?
« Reply #5 on: September 29, 2008, 08:43:48 AM »
Sub ONQUERY(Message,Nickname,Host,ServerNumber)

if Nickname="Swan" then
SendCommand "/echo " & Nickname & " My master has nothing to say to you.",ServerNumber
end if
End Sub
The IceChat God