Skip to content
Buzzen Chat Network

Min-i-mal-ism (new Bcn Connection.)

A TG007 community discussion started by av0ider.

Discussion 39 posts
Page 1 of 2
Open
Topic #12048 · 39 published posts · 6,968 views

Hallo, hallo.

 

I've never really "released" anything, and I'm not really "releasing" anything now.

I'm posting some of my work because I thought it might be useful for some people.

It's a bare-bones socket connection for Buzzen chat, that does nothing more than strip out style tags.

It's aimed at the 'scripter' market - people who want a connection they can mod.

It has NO flood protections, CTCP support, Version information, themes, raws, gate loggers, or tools of any kind.

There is only one dialog. A passport dialog.

It's under 100 lines, sans comments. It's fast, lean, and doesn't hold you back from doing whatever the shit you want.

There's no other connection for Buzzen that fits in to this category, which is the only reason I'm posting this one.

There's another smaller version, that's under 30 lines, and 1k in size. Use that one if you dare.

 

Onwards and upwards.

 

_______________________________________________________________________________
;Min-i-mal-ism
;Barebones socket relay for BCN.
;~av0ider_
_______________________________________________________________________________

;--Events.

on *:start:go


on *:socklisten:n.i:{ sockaccept n.l | sockclose n.i | sockopen n.s 24.215.5.3 6667 }


on *:sockread:n.s:{
  while ($sock(n.s).rq) {

    var %r | sockread %r
    if ($sockbr = 0) { halt }

    tokenize 32 $regsubex(%r,/(\[style (ff:.+?;|(bg)?co:.+?;|[ubi];)*?\]|\[\/style\])/ig,$null)

    if ($2 = WHISPER) { l $1 PRIVMSG $4- }

    l $1-
  }
}


on *:sockread:n.l:{

  while ($sock(n.l).rq) {
    var %r | sockread %r | tokenize 32 %r

    if ($sockbr = 0) { halt }
    if ($1 = USER) { w n.s loginh %u %p }
    if ($1 = PRIVMSG) && ($left($2,1) != $chr(37)) { w n.s WHISPER $comchan($2,1) $2 $3- }
    if ($1 = JOIN) && ($numtok($2,44) > 1) { w n.s JOIN $numtok($1,44) }

    if ($sock(n.s)) { w n.s $1- }

  }
}

;_______________________________________________________________________________

;Aliases.

;-w for Wait/Write
alias w {
  if ($sock($1).status != active) { .timer -m 1 10 w $1- | halt }
  sockwrite -n $1- | halt
}

;-l for Local-sockwrite.
alias l { sockwrite -n n.l $1- | halt }

;-Go for going!
alias go {

  if ($sock(n.*)) { sockclose n.* }
  if ((!%p) || (!%u)) { 

    echo -d * Username and/or password not set. 

    .disconnect 

    pport

    halt

  }

  socklisten n.i
  .server localhost $sock(n.i).port

}
_______________________________________________________________________________

;One and only dialog.

alias pport { dialog -m tblpassport tblpassport }


dialog tblPassport {

  title "Passport Information [/pport]"
  option dbu toolbar

  size                    -1  -1  120  40
  text   "Address:",  1,   5   5   28   8, right
  text   "Password:", 2,   5  16   28   8, right
  edit   "",          3,  33   4   85  10
  edit   "",          4,  33  15   85  10, pass
  button "Okay",      5,   4  26  114  11, flat
}

on *:dialog:tblpassport:sclick:5: {

  if (%u != $did(3)) && ($did(3)) set %u $did(3)
  if (%p != $md5($did(4))) && ($did(4)) set %p $md5($did(4))

  go

  dialog -x $dname

}

;_______________________________________________________________________________
;EOF
;~av0ider_

 

 

Edited Feb 12, 2009 9:32 AM by Ozzy10

Also, no smartass comments about how you can just /server and it's quicker. (h8u@dan)

Sorry bro, Tewl beat you. All you are is a wannabe. Next time try to be more original.

Edited Feb 11, 2009 8:55 PM by Travis

i used a few versions of his connection awhile back... worked really well.

Get information about ircWx here

Tewl's is bloaty.

 

...And that makes yours the fat woman who the airline requires to buy two tickets because her ass won't fit in the space for one.

reason why i don't use buzzen, full of creeps like people on this post..

reason why i don't use buzzen, full of creeps like people on this post..

 

 

Like you?

more and more i see people coming here posting stuff and getting shot down in flames

 

and always seems to be the same few doing it

Spam Honeypot - http://www.haggistech.co.uk/honey(humans do not register)

lol, I guess what you all don't know is that Nick and I are kidding each other.

you both suck.. long live err0r!

Get information about ircWx here

OH NO HE DI'INT!!!!!

It's nice I guess, but unnecessary to write a socket connection if you aren't going to use CLIENTMODE cd1

I'm actually quite impressed. The code is very neatly written. Good job. :)

err0r: 666 + 1337 = 2003 backwards is 3002 which is how many people ozzy has banned from tg
err0r: spooky

I understand that it's 'unnecessary' in the state it's in, but the point is not to use it as is, but to further modify and add to what there is. To that point, I left it without any personalisation, in order for the end user to do with what they wish.

Josh, my post count does not reflect my experience with mIRC... And I know, I code like a girl. ;p

A Kickass Connection Was Hea!

Make yer own!

 

43 lines :pizza:

Edit: Untested lolz

Edited Feb 11, 2009 11:25 PM by Travis

My compact one is 29 lines. Sucka. ;p

nick is a smart guy ;-)

cool connection and good work as usual

 

this will probably be the only time i post on techgear but for nick it was worth it

 

^_^

 

 

 

charles

yeah but yer still ghey!

Aw, uncle Dan. <3 ;p