Jump to content
chain

BitlBee Script

Recommended Posts

  • Administrators

This is a script for BitlBee. BitlBee is an IRC platform that allows you to connect with all social networks right inside your IRC client! More information is in the script itself.

This script here will enhance your BitlBee experience!

Any questions or problems? You can ask me here, or visit my IRC channel #Andrew on GameSurge.

 

; =========================================================================================
; Bitlbee.mrc by Andrew
; Version 1.0.3

; ================ Introduction: ====================
; This script will echo to your active channel, and show tooltips for the following:
; - When a user signs in anywhere
; - When a user signs out anywhere
; - When a user goes idle
; - When a user returns from idle

; =============== Usage: ============================
; First, you will need to set up an account on one of the BitlBee networks.
; For a list of networks you can connect to, visit:
; http://www.bitlbee.org/main.php/servers.html

; When you have eonnected to one of the networks, change your nick to what you want to log in as
; then say "register <password>" in the &bitlbee channel to make your account.

; Now you need to add accounts. To do this, use:
; account add <protocol> <account>
; Valid protocols are:
; Jabber, MSN, OSCAR (AIM/ICQ), Yahoo and Twitter
; Example:
; account add yahoo foobar
; account
; Next you need to enter your password for that account, to do this type:
; /oper <account> <password>

; Example:
; /oper foobar foobarpass

; If you encounter any problems with BitlBee or this script, feel free to chat with me on:
; irc.gamesurge.net #Andrew

; ================== Configuration: ========================

; Do you use a specific nick on BitlBee? If you do change this variable below, otherwise just leave it blank. Your nick will not be changed if nothing is here.
; Note: for auto-login it will use your current nick ($me) to OPER using %bbpasswors set below.
set %bbnick $me

; Set this to your BitlBee password. If you leave this variable empty auto-login will be disabled.
set %bbpassword 
; ================== End of configuration ==========================

; == Auto nick change ==
on *:CONNECT:{
  if ($network == BitlBee && %bbnick !isnum) { 
    if ($me != %bbnick) { nick %bbnick }
  }
}

; == Auto login ==
on *:TEXT:*:&bitlbee:{
  if ($network == BitlBee && $5 == gateway! && %bbpass !isnum) {  
    msg &bitlbee identify 
    if (%bbnick !isnum) { oper %bbnick %bbpass }
    else { oper $me %bbpass }
  }
}

; Log in
on *:JOIN:&bitlbee:{
  set %cnck $nick
  if (%onick isnum) { set %onick 1 }
  inc %onick +1
  ; Facebook log in
  if (*.facebook.com iswm $address) { 
    BitlBeeTip $nick has just logged in to Facebook Chat
  }
  ; Yahoo log in
  elseif (yahoo iswm $address) { 
    BitlBeeTip $nick has just logged in to Yahoo Chat
  }
  ; Windows Live log in
  elseif (*.hotmail.com iswm $address || *.live.com iswm $address) { 
    BitlBeeTip $nick has just logged in to Windows Live Chat
  }
  ; Google Talk log in
  elseif (*.gmail.com iswm address) { 
    BitlbeeTip $nick has just logged in to Google Talk
  }
}

; Log out
on *:QUIT:{
  if ($network == BitlBee) { 
    ; Facebook log out
    dec %onick -1
    if (*.facebook.com iswm $address) { 
      BitlBeeTip $nick has just logged out of Facebook Chat
    }
    ; Yahoo log in
    elseif (yahoo iswm $address) { 
      BitlBeeTip $nick has just logged out of Yahoo Chat
    }
    ; Windows Live log in
    elseif (*.hotmail.com iswm $address || *.live.com iswm $address) { 
      BitlBeeTip $nick has just logged out of Windows Live Chat
    }
    ; Google Talk log in
    elseif (*.gmail.com iswm address) { 
      BitlbeeTip $nick has just logged out of Google Talk
    }
  }
}

; Away
on *:DEVOICE:&bitlbee:{
  set %dvnick $vnick
  if (%dvnicks isnum) { set %dvnicks 1 }
  inc %dvnicks +1
  BitlBeeTip $vnick is now away
}

; Return from away
on *:VOICE:&bitlbee:{
  if ($vnick != %cnick && > %dvnicks >= 1) { 
    BitlBeeTip $vnick has returned from away
    dec %dvnicks -1
  }
}

alias bitlbee {
  if ($1 == vars) { 
    echo -a Current BitlBee nick: %bbnick
    echo -a Currentl BitlBee password: %bbpass
    echo -a Variable cnick: %cnick
    echo -a Onlne nicks: %onicks
    echo -a Away nicks: %dvnicks
  }
  elseif ($1 == logout) { 
    .msg &bitlbee account off
    .timer1 1 5 BitlBeeTip You have been signed out of BitlBee
    unset %onicks
    unset %anicks
  }
  elseif ($1 == login) { 
    .msg &bitlbee identify
    oper %bbnick %bbpass
    .timer1 1 5 BitlBeeTip You have been signed in to BitlBee
  } 
  else {
    echo -a Usage: /bitlbee vars|logout|login
  }
}

alias BitlBeeTip {
  if ($tip(bitlbee)) tip -t bitlbee $+($tip(bitlbee).text, $crlf, -, $crlf, $1-)
  else noop $tip(bitlbee, BitlBee Notification, $1-, 7)
}

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...


×
×
  • Create New...