-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsimonsays.cs
32 lines (27 loc) · 1.02 KB
/
simonsays.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
using System;
using System.Collections.Generic;
using System.Threading;
using System.IO;
using System.Windows.Forms;
using System.Windows.Input;
namespace RutonyChat
{
public class Script
{
// writes the text in a file
public void RunScript(string site, string username, string text, string param)
{
// simple script, that writes the text in a file
// change the path
string file = @"d:\stream\simonsays.txt";
// easy way to filter the code word, just use the substring without the code wort
// for example for "!say " use substring beginning at char 5
string say = text.Substring(5);
string simonsays = string.Format("simon says {0}", simonsays);
RutonyBot.BotSay(site, simonsays);
// clear the file and write new text in it
RutonyBotFunctions.FileClear(file);
RutonyBotFunctions.FileAddString(file, simonsays);
}
}
}