Author Topic: Ontext and write to file  (Read 3278 times)

Magic

  • Guest
Ontext and write to file
« on: June 14, 2006, 02:51:42 PM »
the first part of the script should be fairly simple:)

<User>!help

Bot are then supposed to notice the user with some info (it should only be on 1 or 2 channels, not everywhere the bot is located)

2nd part is a write to file and read to file case

<User>!addnap 11:11

This should be restricted to sop and founder only, @ shouldn't be able to use the !addnap function, this should write to a file which can be viewed with !nap (which everyone should be able to use). This should be on a notice as well as the first part

again its channel specific, not everywhere the bot is located it should be able to be accessed:)

Morio

  • Global Moderator
  • Sr. Member
  • *****
  • Posts: 256
Re: Ontext and write to file
« Reply #1 on: June 15, 2006, 12:25:43 AM »
I don't know about writing to a file, but the first thing you saud might be done something like this:

Code: [Select]
Sub ONTEXT(Message,Channel,Nickname,Host,ServerNumber)
'first check that the message comes from the right channel(s)
  If LCase(Channel) = "#channel1" or LCase(Channel) = "#channel2" then
    'then check for the right message
    If Message = "!help! then
      'and finally send the info, if you want to send multiple lines, just add multiple SendCommand lines
      SendCommand "/notice " + Nickname + " info to be sent"
    End If
  End If
End Sub
"I don't know what World War 3 will be fought with, but I know World War 4 with be fought with sticks and stones." - Albert Einstein