JOhnson Posted October 22, 2009 Report Share Posted October 22, 2009 I hope someone might be able to help me and tell me if this code might work in buzzen its a basic connection code I was given for spcn (which works) and what iv done is iv been messing about with it to get it to work in buzzen .... it lets you do the email and password and it does try to connect to buzzen ... so what I will do is put both the spcn code and the buzzen code below and let you see both so someone might be able to tell me what they think ... I know it will need a roomlister and I know someone that is doing one ... as always nais tuke = thank you for any replies and please remember Im still learning SPCN on *:START:{ if ($getuser == $null) { adduser $$?"Enter your email account" | adduserpw $$?"Enter its password" } if (!$exists(SPCNFont.ini)) { dialog -m font font } connect } on *:CONNECT:{ if ($getuser == $null) { adduser $$?"Enter your email account" | adduserpw $$?"Enter its password" } NICKSERV IDENTIFY $getuser $getuserpw } on *:JOIN:#:{ if ($nick == $me) { who # } } on *:disconnect:{ echo # 12 DisConnected from SPCNChat } alias adduser { writeini spcn.ini account email $1 } alias adduserpw { writeini spcn.ini account pass $1 } alias getuser { return $readini(spcn.ini,account,email) } alias getuserpw { return $readini(spcn.ini,account,pass) } alias connect { server two.irc.sparkpea.net } dialog font { title "Font Dialog By BOx" size -1 -1 102 63 option dbu combo 1, 2 14 60 50, sort size drop text "Font Type", 2, 18 5 26 8 combo 3, 2 39 60 50, sort size drop text "Font Color", 4, 18 27 26 8 check "Bold", 5, 74 14 27 10 check "Italic", 6, 74 25 27 10 check "Random Color", 7, 2 50 43 10 check "Use Font", 8, 67 1 33 10 } alias pini { if ($2 == $null) return $readini(SPCNFont.ini,n,settings,$$1) if ($1 == r) remini SPCNFont.ini settings $$2 else writeini SPCNFont.ini settings $$1 $2- } On *:Dialog:font:init:*: { if ($pini(do.font)) did -c font 8 if ($pini(font.b)) did -c font 5 if ($pini(font.i)) did -c font 6 if ($pini(font.r)) did -c font 7 didtok font 3 44 Black,White,DarkBlue,DarkGreen,Red,DarkRed,Purple,DarkYellow,Yellow,Green,Teal,C yan,Blue,Pink,DarkGray,Gray didtok font 1 44 Arial,Tahoma,Arial Black,Arial Narrow,Century,Comic Sans MS did -c font 3 $didwm(font,21,$pini(font.color) $+ *,1) did -c font 1 $didwm(font,19,$pini(font.font) $+ *,1) } on *:dialog:font:sclick:*:{ if ($did == 8) { if ($pini(do.font)) { pini r do.font | did -u font 8 } else { pini do.font $true | did -c font 8 } } if ($did == 5) { if ($pini(font.b)) { pini r font.b | did -u font 5 } else { pini font.b $true | did -c font 5 } setfontcode } if ($did == 6) { if ($pini(font.i)) { pini r font.i | did -u font 6 } else { pini font.i $true | did -c font 6 } setfontcode } if ($did == 7) { if ($pini(font.r)) { pini r font.r | did -u font 7 } else { pini font.r $true | did -c font 7 } } if ($did == 1) { pini font.font $did(font,$did).seltext | setfontcode } if ($did == 3) { pini font.color $did(font,$did).seltext | setfontcode } } alias setfontcode { var %x = $pini(font.color) var %c $replace(%x,white,1,black,2,darkred,3,darkgreen,4,darkblue,5,darkyellow,6,purple,7,teal,8, lightgray,9,darkgray,\n,red,11,green,12,blue,\r,yellow,14,pink,15,cyan,16) %x = 1 if ($pini(font.b)) inc %x if ($pini(font.i)) %x = $calc(%x + 2) if ($pini(font.u)) %x = $calc(%x + 4) pini font.code %c %x $replace($pini(font.font),$chr(32),\b) $+;0 } alias webfont { if ($pini(do.font)) { if ($gettok($pini(font.code),1,32) isnum) var %fc = $chr($gettok($pini(font.code),1,32)) else var %fc = $gettok($pini(font.code),1,32) if ($pini(font.r)) { %fc = $rand(1,16) while ((%fc == 10) || (%fc == 13)) %fc = $rand(1,16) } return $chr(1) $+ S $iif($pini(font.r),$chr(%fc),%fc) $+ $chr($gettok($pini(font.code),2,32)) $+ $gettok($pini(font.code),3,32) $1- $chr(1) } else return $1- } alias mircfont { if (!$pini(do.font)) return $1- var %a = $gettok($pini(font.code),1,32) var %b = $gettok($pini(font.code),2,32) if (%a == 1) %a = 00 elseif (%a == 2) %a = 01 elseif (%a == 3) %a = 05 elseif (%a == 4) %a = 03 elseif (%a == 5) %a = 02 elseif (%a == 6) %a = 07 elseif (%a == 7) %a = 06 elseif (%a == 8) %a = 10 elseif (%a == 9) %a = 15 elseif (%a == 11) %a = 04 elseif (%a == 12) %a = 09 elseif (%a == 14) %a = 08 elseif (%a == 15) %a = 13 elseif (%a == 16) %a = 11 elseif (%a == \r) %a = 12 elseif (%a == \n) %a = 14 else %a = 01 return $iif(%b == 2,$chr(2)) $+ $chr(3) $+ %a $+ $1- $+ $chr(1) } on *:input:*:{ if (/* iswm $1) || (//* iswm $1) { return } msg # $webfont($1-) halt } menu channel { - Fonts:{ dialog -m font font } - Connect .server 2 :{ server -m two.irc.sparkpea.net } BUZZEN on *:START:{ if ($getuser == $null) { adduser $$?"Enter your email account" | adduserpw $$?"Enter its password" } if (!$exists(BuzzenFont.ini)) { dialog -m font font } connect } on *:CONNECT:{ if ($getuser == $null) { adduser $$?"Enter your email account" | adduserpw $$?"Enter its password" } NICKSERV IDENTIFY $getuser $getuserpw } on *:JOIN:#:{ if ($nick == $me) { who # } } on *:disconnect:{ echo # 12 DisConnected from BuzzenChat } alias adduser { writeini buzzen.ini account email $1 } alias adduserpw { writeini buzzen.ini account pass $1 } alias getuser { return $readini(buzzen.ini,account,email) } alias getuserpw { return $readini(buzzen.ini,account,pass) } alias connect { server irc.buzzen.com } dialog font { title "Font Dialog By BOx" size -1 -1 102 63 option dbu combo 1, 2 14 60 50, sort size drop text "Font Type", 2, 18 5 26 8 combo 3, 2 39 60 50, sort size drop text "Font Color", 4, 18 27 26 8 check "Bold", 5, 74 14 27 10 check "Italic", 6, 74 25 27 10 check "Random Color", 7, 2 50 43 10 check "Use Font", 8, 67 1 33 10 } alias pini { if ($2 == $null) return $readini(BuzzenFont.ini,n,settings,$$1) if ($1 == r) remini BuzzenFont.ini settings $$2 else writeini BuzzenFont.ini settings $$1 $2- } On *:Dialog:font:init:*: { if ($pini(do.font)) did -c font 8 if ($pini(font.b)) did -c font 5 if ($pini(font.i)) did -c font 6 if ($pini(font.r)) did -c font 7 didtok font 3 44 Black,White,DarkBlue,DarkGreen,Red,DarkRed,Purple,DarkYellow,Yellow,Green,Teal,C yan,Blue,Pink,DarkGray,Gray didtok font 1 44 Arial,Tahoma,Arial Black,Arial Narrow,Century,Comic Sans MS did -c font 3 $didwm(font,21,$pini(font.color) $+ *,1) did -c font 1 $didwm(font,19,$pini(font.font) $+ *,1) } on *:dialog:font:sclick:*:{ if ($did == 8) { if ($pini(do.font)) { pini r do.font | did -u font 8 } else { pini do.font $true | did -c font 8 } } if ($did == 5) { if ($pini(font.b)) { pini r font.b | did -u font 5 } else { pini font.b $true | did -c font 5 } setfontcode } if ($did == 6) { if ($pini(font.i)) { pini r font.i | did -u font 6 } else { pini font.i $true | did -c font 6 } setfontcode } if ($did == 7) { if ($pini(font.r)) { pini r font.r | did -u font 7 } else { pini font.r $true | did -c font 7 } } if ($did == 1) { pini font.font $did(font,$did).seltext | setfontcode } if ($did == 3) { pini font.color $did(font,$did).seltext | setfontcode } } alias setfontcode { var %x = $pini(font.color) var %c $replace(%x,white,1,black,2,darkred,3,darkgreen,4,darkblue,5,darkyellow,6,purple,7,teal,8, lightgray,9,darkgray,\n,red,11,green,12,blue,\r,yellow,14,pink,15,cyan,16) %x = 1 if ($pini(font.b)) inc %x if ($pini(font.i)) %x = $calc(%x + 2) if ($pini(font.u)) %x = $calc(%x + 4) pini font.code %c %x $replace($pini(font.font),$chr(32),\b) $+;0 } alias webfont { if ($pini(do.font)) { if ($gettok($pini(font.code),1,32) isnum) var %fc = $chr($gettok($pini(font.code),1,32)) else var %fc = $gettok($pini(font.code),1,32) if ($pini(font.r)) { %fc = $rand(1,16) while ((%fc == 10) || (%fc == 13)) %fc = $rand(1,16) } return $chr(1) $+ S $iif($pini(font.r),$chr(%fc),%fc) $+ $chr($gettok($pini(font.code),2,32)) $+ $gettok($pini(font.code),3,32) $1- $chr(1) } else return $1- } alias mircfont { if (!$pini(do.font)) return $1- var %a = $gettok($pini(font.code),1,32) var %b = $gettok($pini(font.code),2,32) if (%a == 1) %a = 00 elseif (%a == 2) %a = 01 elseif (%a == 3) %a = 05 elseif (%a == 4) %a = 03 elseif (%a == 5) %a = 02 elseif (%a == 6) %a = 07 elseif (%a == 7) %a = 06 elseif (%a == 8) %a = 10 elseif (%a == 9) %a = 15 elseif (%a == 11) %a = 04 elseif (%a == 12) %a = 09 elseif (%a == 14) %a = 08 elseif (%a == 15) %a = 13 elseif (%a == 16) %a = 11 elseif (%a == \r) %a = 12 elseif (%a == \n) %a = 14 else %a = 01 return $iif(%b == 2,$chr(2)) $+ $chr(3) $+ %a $+ $1- $+ $chr(1) } on *:input:*:{ if (/* iswm $1) || (//* iswm $1) { return } msg # $webfont($1-) halt } menu channel { - Fonts:{ dialog -m font font } - Connect .connect{ server irc.buzzen.com } Link to comment Share on other sites More sharing options...
Guest Travis Posted October 22, 2009 Report Share Posted October 22, 2009 No it wont. Buzzen and SPCN use different protocol. I can point you at a connection though that has everything you would ever need. Link to comment Share on other sites More sharing options...
Guest Travis Posted October 22, 2009 Report Share Posted October 22, 2009 Why would I be biased? To help you get that to work I'd have to rewrite the whole thing. Why would I do that? At your level of scripting you should stick with simpler stuff and use someone else's connection. Link to comment Share on other sites More sharing options...
Evolution Posted October 22, 2009 Report Share Posted October 22, 2009 Problem is several differances between buzzen and spcn. But it wouldnt be hard to make it a multi connection.... since your not really using sockets. Its just a matter of how u login to each and seperateing events, fonts, and stuff thats just not compatible Buzzen doesnt use nickserv, raw loginh <email password> works kind of like the nickserv identify. Then once connected to rooms your gonna experiance difficulty with the script reading the room unless you strip the font styles spcn and buzzen as far as i know the two servers use totally diff. methods of fonts.. Good luck I know err0rs had fun with his all in 1 script maybe he could provide more help Link to comment Share on other sites More sharing options...
Evolution Posted October 22, 2009 Report Share Posted October 22, 2009 At this point is one those times i agree with trav .. um you should play around on each server learn how they work before attempting a connection Link to comment Share on other sites More sharing options...
Guest Travis Posted October 22, 2009 Report Share Posted October 22, 2009 (edited) Well there you go. Johnson, I didn't write a connection for a server till after 5 or 6 years of messing with mIRC. And it was a very simple, basic server. Buzzen is not. You have to adjust things to support IRCwx way of doing things. I wrote an access list a few years before I attempted a connection. I'm not trying to offend you, I am being honest. Why don't you practice scripting first? The first real script I made was a nick logger. on join, if nick is not in your log log it. if nick is in your log check for matching nicks. if nick matches nick is return user. if nick doesnt match it is a clone. This is way easier than writing a connection for Buzzen. Think you are up to it? There are many great connections written already. Tewls Moschino Umbrella rlx Err0r wrote one and Yes I have a couple connections too A pilot doesn't jump into a jet fighter. They practice on a crop duster. Noone is trying to put you down. I'm trying to help you. Edited October 22, 2009 by Travis Link to comment Share on other sites More sharing options...
takaharu_ Posted October 22, 2009 Report Share Posted October 22, 2009 (edited) Moved to Buzzen. Travis, think about the way youu're phrasing something before sending out a message. Things like "Think you're up to it?" after suggesting someone tries to do something easier than what they are currently attempting can be taken negatively, very easily. If you disagree, keep it to PMs, please. I ask this as a fellow forum user, not as a GM. Johnson - to an extent, I do agree with Travis; try out simpler things than connections. I spent years on mIRC and I knew how to do many things but I didn't attempt a connection (out of choice, more than anything else). Other than things like games with an AI (which is just obscene) a connection is one of the hardest things to do with mIRC. Try out some of the lesser things, that you would like to use and want to put your name behind then, over time, build up your knowledge and experience and go for the bigger, more demanding things. It will also get you to be more confident with your programming and you'll be bashing out coding more smoothly. Edited October 22, 2009 by takaharu_ Link to comment Share on other sites More sharing options...
Guest Travis Posted October 22, 2009 Report Share Posted October 22, 2009 I guess I didn't explain myself decently. I am not one to call anyone a noob and give them a bad attitude for not knowing something. I am very happy to help people learn scripting and even excited as there aren't too many true scripters left. I wasn't telling you that you were a stupid noob that couldn't do it. I was saying it is a little complicated and knowing you as I do you may better serve yourself by writing something less complicated. To make your code you would delete most of it and edit the rest to work for buzzen. They are two different setups. The only thing that's really useable is the email & password bit, but it's kinda big for only storing one account. You would server yourself better making two variables, %email & %password and referring to those directly instead of using an alias. To connect to buzzen with mIRC the address is: irc.buzzen.net port is 6667 /server irc.buzzen.net 6667 Then, you use the logon event with the prefix to tell it to execute before mIRC does. ^ on ^*:logon:*:{ } Go check the Buzzen section in the forum. You will find posts about connecting to buzzen. And this post tells you how to auth yourself. http://www.uaeforum.org/index.php?&topic=628.0 Ask Questions! Err0r's connection connects using the /server command like Molson's does. http://www.tg007.net/forum/index.php?showtopic=12859 Vulcan wrote one as well. http://www.tg007.net/dls/index.php?action=category&id=46 Link to comment Share on other sites More sharing options...
Site Moderator chain Posted October 22, 2009 Site Moderator Report Share Posted October 22, 2009 wow i dont know what I've missed. But this i can say from experince ..a connection is a very hard thing when you dont understand sockets to start a connection and Johnson I applaud you for trying my friend. You had an idea and you went with it! But truly if your looking for an example on certain things take BV2 or smaller connections so you get a rough idea on the logins and such I dont think Travis meant it in a bad way ..his approach is very straight forward and dosent mix words, but he dose know his connections...!! I deleted the post on my site as you requested ..pity tho but dont take offense, your trying my friend and that is what counts Link to comment Share on other sites More sharing options...
err0r Posted October 23, 2009 Report Share Posted October 23, 2009 the font codes for spcn and buzzen are totally different. A basic socket connection to the irc.* will work, though the auth method is different for each. A bulk of the above code seems to deal with the font handling. spcn uses the old MSN type font styles S Comic\bSans\bMS;0 text whereas buzzen uses style tags [style ff:Comic Sans MS;co:#4682B4;b;u;] text [/style] so to answer your question. Yes you could change enough of the code to work but realistically it would be much easier to write a separate connection for buzzen instead of trying to edit anything you used from spcn I have a simple sockless connection i use which travis linked to in a previous post. If you need help adding a basic font color/style alias to that I can help. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now