Bot Logging Channel Script 5.0

Moderator: GeekShed.Net Staff

Bot Logging Channel Script 5.0

Postby bradjoe96 » Thu Jun 24, 2010 2:33 am

This is Bot Logging Channel Script v5.00

===Version 5.00 Updates===
1) Now informed on VOP, HOP, AOP, SOP, and Owner add.
2) Fixed a few bugs.
3) Connection Errors are now logged in a FILE in your Application Data\mIRC folder.
4) Will no longer notify on NOTICE (because of entry messages, this can get annoying)
5) Will inform on ACTION in a PM, not only TEXT.

-Installation Instructions-
***Remember that all these instructions should be performed on the bot's IRC client***
1. Open mIRC
2. Go to Tools>Scripts Editor
3. Copy and Paste the code below into your Remote tab.
4. Go to File>Save As and save it as BotLogging.mrc
5. Go to File>Load and load BotLogging.mrc
6. Fill out all of the pop-up dialog boxes.

Enjoy the script!


Code: Select all
;  Bot Logging Channel Script
;  Version 5.00
;  By: bradjoe96
;
;  Any errors can be reported in #bradjoe96 on irc.geekshed.net
;
;  Note: Feel free to edit this script to your liking.
;        If you have made a modification to the script and the script
;        is not working, please make sure that your modifications did
;        not cause the script to become unresponsive before reporting
;        the error to bradjoe96.
;
;

;  --Loading Message--
ON *:LOAD:{
  Echo -a 4 6You have just loaded 3B4o5t 6L7o9g3g4i5n6g 7C9h3a4n5n6e7l 9S3c4r5i6p7t 4 6Version 5.00
  Echo -a 4 6By: bradjoe96
  Echo -a 4 6Questions and comments? You can find me in #bradjoe96 on irc.geekshed.net
  Echo -a 4 6irc://irc.geekshed.net
  botlogvar
}
;  --Variable Setting--
alias botlogvar {
  $iif($?!="Welcome to Bot Logging Script Version 5.00. I will need you to give me some information before this script can work correctly. Do you agree to this?" == $true,goto one,)
  :one
  set %botowner $?="What is the nick of the owner of the bot?"
  set %logchannel $?="What is the name of the logging channel?"
  set %botname $?="What is the nick of the bot?"
}
;  --Logging--
;  It is highly recommended to NOT change anything in the script from here
;  on unless you are COMPLETELY sure of what you are doing.
ON *:LOAD:/mkdir ConnectionLogs
ON *:ERROR:*:{
  if (banned isin $1-) {
    write ConnectionLogs\ $+ $replace($date,/,-) $+ .ConnectionLogs $network [ $+ $asctime(hh:nn:ss tt) $+ ][NETWORK BAN] Unable to reconnect to $network $+ : $1-
    msg %logchannel [NETWORK BAN ERROR] Check logs under Application Data for mIRC for more information.
    HALT
  }
  else {
    write ConnectionLogs\ $+ $replace($date,/,-) $+ .ConnectionLogs $network [ $+ $asctime(hh:nn:ss tt) $+ ][CONNECTION ERROR] $server Connection rejected by server: $1-
    msg %logchannel [CONNECTION ERROR] Check logs under Application Data for mIRC for more information.
  }
}
ON *:DISCONNECT: {
  write ConnectionLogs\ $+ $replace($date,/,-) $+ .ConnectionLogs $network [ $+ $asctime(hh:nn:ss tt) $+ ][DISCONNECT] Disconnected from $network $+ ( $+ $server $+ ) There is now $scon(0) Connections established.
  msg %logchannel [DISCONNECTION] Check logs under Application Data for mIRC for more information.
}
ON *:CONNECTFAIL: {
  write ConnectionLogs\ $+ $replace($date,/,-) $+ .ConnectionLogs $network [ $+ $asctime(hh:nn:ss tt) $+ ][CONNECTION ERROR] Unable to establish a connection with $server $+ ! Reason: $1-
  msg %logchannel [CONNECTION ERROR] Check logs under Application Data for mIRC for more information.
}
ON *:CONNECT: {
  write ConnectionLogs\ $+ $replace($date,/,-) $+ .ConnectionLogs $network [ $+ $asctime(hh:nn:ss tt) $+ ][CONNECT] Connecting to $network $+ ( $+ $server - $serverip $+ ) This is connection no. $cid established.
  msg %logchannel [CONNECTION MADE] Check logs under Application Data for mIRC for more information.
}
ON *:TEXT:*:#: {
  if ($1 == !KICK) { HALT }
  if ($1 == !K) { HALT }
  if ($1 == !OP) { HALT }
  if ($1 == !BAN) { HALT }
  if ($1 == !B) { HALT }
  if ($1 == !SOP) { HALT }
  if ($1 == !AOP) { HALT }
  if ($1 == !HOP) { HALT }
  if ($1 == !VOP) { HALT }
  if ($1 == !DOWN) { HALT }
  if ($1 == !UP) { HALT }
  if ($nick == $me) { HALT }
  if ($nick == %botowner) { HALT }
  if (* $+ %botname $+ * iswm $1-) {
    msg %logchannel - $+ $network $+ - $chan $+ : I was mentioned by $nick at $time $+ .
  }
}
ON *:RAWMODE:#:{
  if ($nick == %botowner) { HALT }
  if (($1 == -a) && ($2 == %botname)) { msg %logchannel - $+ $network $+ - $chan $+ : My SOP was removed by $nick at $time $+ . }
  if (($1 == -o) && ($2 == %botname)) { msg %logchannel - $+ $network $+ - $chan $+ : My AOP was removed by $nick at $time $+ . }
  if (($1 == -v) && ($2 == %botname)) { msg %logchannel - $+ $network $+ - $chan $+ : My VOP was removed by $nick at $time $+ . }
  if (($1 == -h) && ($2 == %botname)) { msg %logchannel - $+ $network $+ - $chan $+ : My HOP was removed by $nick at $time $+ . }
  if (($1 == -q) && ($2 == %botname)) { msg %logchannel - $+ $network $+ - $chan $+ : My Owner was removed by $nick at $time $+ . }
  if (($1 == +v) && ($2 == %botname)) { msg %logchannel - $+ $network $+ - $chan $+ : I was given VOP by $nick at $time $+ . }
  if (($1 == +o) && ($2 == %botname)) { msg %logchannel - $+ $network $+ - $chan $+ : I was given AOP by $nick at $time $+ . }
  if (($1 == +h) && ($2 == %botname)) { msg %logchannel - $+ $network $+ - $chan $+ : I was given HOP by $nick at $time $+ . }
  if (($1 == +a) && ($2 == %botname)) { msg %logchannel - $+ $network $+ - $chan $+ : I was given SOP by $nick at $time $+ . }
  if (($1 == +q) && ($2 == %botname)) { msg %logchannel - $+ $network $+ - $chan $+ : I was given Owner by $nick at $time $+ . }
}
ON *:KICK:#: {
  if ($nick == %botowner) { HALT }
  if ($knick == $me) {
    msg %logchannel - $+ $network $+ - $chan $+ : KICK by $nick at $time $+ .
  }
}
ON *:BAN:#: {
  if ($nick == %botowner) { HALT }
  if ($me isin $banmask) {
    msg %logchannel - $+ $network $+ - $chan $+ : BAN by $nick at $time $+ .
  }
  if ($address($me, 2) iswm $banmask) {
    msg %logchannel - $+ $network $+ - $chan $+ : BAN by $nick at $time $+ .
  }
}
ON *:TEXT:*:?: {
  if (serv isin $nick) { HALT }
  if ($nick == $me) { HALT }
  if ($nick == %botowner) { HALT }
  else { msg %logchannel - $+ $network $+ - $nick sent me a private message at $time $+ : $1- }
}
ON *:ACTION:*:?: {
  if (serv isin $nick) { HALT }
  if ($nick == $me) { HALT }
  if ($nick == %botowner) { HALT }
  else { msg %logchannel - $+ $network $+ - $nick sent me a private message at $time $+ : $1- }
}
bradjoe96
 
Posts: 5
Joined: Tue Oct 27, 2009 9:33 pm

Return to Script help

Who is online

Users browsing this forum: No registered users and 3 guests

cron