Welcome, Guest. Please login or register.
Did you miss your activation email?
September 05, 2010, 06:34:09 am
News:
Welcome to unofficial VC:MP forums!

Pages: [1]
Print
Author Topic: IRC Echo  (Read 661 times)
Javi
Newbie
*
Posts: 38


View Profile WWW
« on: January 15, 2010, 03:42:36 pm »

Hey, I've been working on the echo channel for my server, and needed to find out a way to check if the user is OP, HOP, and VOP. I tried looking out at the wiki but didn't have luck. Thanks in advise.
Logged
Juppi
Administrator
Newbie
*****
Posts: 23



View Profile WWW
« Reply #1 on: January 15, 2010, 08:52:50 pm »

You can get the channel user modes by sending "NAMES <#channelname>" to the IRC server, and then parsing the output from the server which is about in this format (this is from the mirc debug window)

Code:
<- :irc.nl.project-apollo.co.uk 353 Juppi = #Miami-Dade :Tamas!Tamas@LU-BCF70FFB.rubicom.hu TyranT!TyranT@LU-9FA04AD5.dsl.telesp.net.br FlAmEsAy!ernestoros@1C9F6C1.B2493FCB.DEE9DE84.IP Devian!Devian@LU-9FA04AD5.dsl.telesp.net.br &@NubCake!TheCake@Is.A.Lie Thijn!Thijn@The.Netherlands.FTW +BB101!No@i.liek.to.bitch.n.moan
<- :irc.nl.project-apollo.co.uk 353 Juppi = #Miami-Dade :Jc17!i_love_ic@88B27F4B.5DC36FB3.A1676F80.IP SGB!lol@LU-353B5B5F.regn.hsdb.sasknet.sk.ca +Rider!Rider@Rides.On.The.Winds +RoboPig!RoboPig@is.not.a.robot +Sampy!Sampy@stirredfork.net @StriKe!StriKe@at.the.worlds.end @j-king`!j-king@88B27F4B.5DC36FB3.A1676F80.IP
<- :irc.nl.project-apollo.co.uk 353 Juppi = #Miami-Dade :G!G@88B27F4B.5DC36FB3.A1676F80.IP Fer_r_ari!Fer_r_ari@88B27F4B.5DC36FB3.A1676F80.IP +Mike!mike@ohh.im.wicked.and.im.lazy @kenwood!afaf@LU-365B719.client.mchsi.com +Ralph!Ralph@i.like.to.watch Mert`!default@LU-3A9A91AF.lobbyzffs.com %Sephiroth!~Sephiroth@gruppe.sechs
<- :irc.nl.project-apollo.co.uk 353 Juppi = #Miami-Dade :+himselfe!yeah@all.sense.and.reason +neil!neil@LU-571E8EFC.nwebsolutions.co.uk +jaqel!jaqel@all.your.boxes.are.cardboard &@Force!The.Force@is.with.you +ozzie!ozzie@stirredfork.net &@+VRocker-Server!vrocker@LU-458FAABC &@+Mattz!Mattz@optimum.online
<- :irc.nl.project-apollo.co.uk 353 Juppi = #Miami-Dade :&@+VRocker!VRocker@liberty-unleashed.co.uk @+Kill3R!Kill3R@lol.lmao.rofl.xD ~@+Juppi!Juppi@the.dark.side ~@+Juppi-irssi!Juppi@the.dark.side @+AdTec_224!AdTec_224@local.host
<- :irc.nl.project-apollo.co.uk 366 Juppi #Miami-Dade :End of /NAMES list.

So as you can see the names list start with 353 and every user in the list has been prefixed by their channel modes:
Code:
~@+Juppi!Juppi@the.dark.side

By parsing that data with squirrel string handling functions (check the squirrel manual and squirrel standard libraries manual) and/or custom written GetTok/NumTok functions you can get the modes and save them to an array or anything.
Logged


Quote
<+himselfe> while (tammer) { ban("breaSt12"); }
Force
Moderator
Newbie
*****
Posts: 18


View Profile WWW
« Reply #2 on: January 21, 2010, 02:17:51 am »

I should hopefully be releasing an FBS IRC Echo script in the upcoming weeks.

It will be based off my LU script but it might work with the VC:MP server after a few tweaks.
Logged

Javi
Newbie
*
Posts: 38


View Profile WWW
« Reply #3 on: January 21, 2010, 04:28:00 pm »

Thanks Juppi, I got this working.

Logged
HelenJames
Newbie
*
Posts: 1


View Profile
« Reply #4 on: July 27, 2010, 09:27:05 pm »

I think we all get a little bit distracted from the main topicstarter's theme
Logged
Pages: [1]
Print
 
Jump to: