mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Jun 2014
Posts: 4
T
TGUK Offline OP
Self-satisified door
OP Offline
Self-satisified door
T
Joined: Jun 2014
Posts: 4
I got my points system works fine but when my mods try to add remove points for fellows users says this function is only available to mods.

Here is the point and mod that I use:

[script]
n0=alias -l addPoints {
n1= if ($1 !isnum) { echo 2 -st $1 is not a number. It needs to be a number. | halt }
n2= var %topic $+($chan,.,$nick)
n3= var %points $calc($readini(Points.ini,%topic,Points) + $1)
n4= writeini -n Points.ini %topic Points %points
n5= return %points
n6=}
n7=
n8=alias -l lookUpPoints {
n9= var %topic $+($chan,.,$nick)
n10= var %points $readini(Points.ini,%topic,Points)
n11= return %points
n12=}
n13=alias doaddpoints {
n14= if ($3 !isnum) { echo 2 -st $3 is not a number. It needs to be a number. | halt }
n15= var %topic $+($1,.,$2)
n16= var %points $calc($readini(Points.ini,%topic,Points) + $3)
n17= writeini -n Points.ini %topic Points %points
n18= echo -a Added points for %topic
n19=}
n20=
n21=alias dorempoints {
n22= var %topic $+($1,.,$2)
n23= remini -n Points.ini %topic Points
n24= echo -a Removed points for %topic
n25=}
n26=
n27=on *:text:!points:#:{
n28= if ((%floodpoints) || ($($+(%,floodpoints.,$nick),2))) { return }
n29= set -u10 %floodpoints On
n30= set -u30 %floodpoints. $+ $nick On
n31= msg # $nick has $readini(Points.ini,$+(#,.,$nick),Points) total points.
n32=}
n33=
n34=on $*:text:/!points (add|remove)/Si:#:{
n35= if ($nick isop #) {
n36= if ($0 < 3) { msg # Insufficient parameters: Use !points <add|remove> <user> [number] | return }
n37= writeini -n Points.ini $+(#,.,$3) Points $calc($readini(Points.ini,$+(#,.,$3),Points) $iif($2 == add,+,-) $iif($4 isnum,$4,1))
n38= { msg $chan $3 now has $readini(Points.ini,$+(#,.,$3),Points) total points. }
n39= }
n40= else { msg $chan This command is only available to moderators. }
n41=}
n42=on !*:join:#:{
n43= $+(.timerpoints.,#,.,$nick) 0 300 add.pts $+(#,.,$nick)
n44= add.pts $+(#,.,$nick)
n45=}
n46=on !*:part:#:$+(.timerpoints.,#,.,$nick) off
n47=alias -l add.pts {
n48= writeini -n Points.ini $1 Points $calc($readini(Points.ini,$1,Points) + 1)
n49=}

Joined: Jan 2004
Posts: 1,358
L
Hoopy frood
Offline
Hoopy frood
L
Joined: Jan 2004
Posts: 1,358
/help if then else
/help return

Joined: Jun 2014
Posts: 4
T
TGUK Offline OP
Self-satisified door
OP Offline
Self-satisified door
T
Joined: Jun 2014
Posts: 4
where do i add this

Joined: Jan 2004
Posts: 1,358
L
Hoopy frood
Offline
Hoopy frood
L
Joined: Jan 2004
Posts: 1,358

Joined: Apr 2014
Posts: 191
B
Vogon poet
Offline
Vogon poet
B
Joined: Apr 2014
Posts: 191
Your mods must have @ sign in their nick to be able to trigger !add/remove.
I'm not sure how to do it in twitch server, but in other server, you can do it use:
Code:
/mode #yourchannel +o yourmodnick

Joined: Dec 2013
Posts: 779
N
Hoopy frood
Offline
Hoopy frood
N
Joined: Dec 2013
Posts: 779
On twitch, you have to connect to the irc through the website and type "/mod nick" and "/unmod nick" to change opstatus.


Nillens @ irc.twitch.tv
Nillen @ irc.rizon.net
Joined: Jun 2014
Posts: 4
T
TGUK Offline OP
Self-satisified door
OP Offline
Self-satisified door
T
Joined: Jun 2014
Posts: 4
i have mods on my channel just they cantnuse nto bot funcion to add or remove points when they try to it say the funcion is only avaiable to mods

Joined: Jul 2006
Posts: 4,145
W
Hoopy frood
Offline
Hoopy frood
W
Joined: Jul 2006
Posts: 4,145
Your script states that only an operator (from mIRC point of view) can use the function you made, either they are an operator or they are not (again, from mIRC point of view).
From what I've read about twitch, it's not acting as a real IRC server and that has consequences.
A simple test is to execute in your mIRC's editbox:
//if (<nickname> isop #yourchannel) echo -a yes
And if that nickname is an operator from mIRC's point of view, you'll have the echo, otherwise mIRC doesn't recognize that nickname as an operator, which would be an error caused by twitch not being a real IRC server, or maybe just a fail from you where the nickname was in fact not an operator smile


#mircscripting @ irc.swiftirc.net == the best mIRC help channel
Joined: Dec 2013
Posts: 9
R
Nutrimatic drinks dispenser
Offline
Nutrimatic drinks dispenser
R
Joined: Dec 2013
Posts: 9
Do you see the @ sign in the userlist in the irc client?(located on the right hand side on mIRC)

I you don't, then you have to wait until you see a message like "jtv sets mode: +o <mod_nick>" or the @ sign before the <mod_nick> in the userlist.

Twitch's IRC servers usually do not instantaneously give +o to mods. It can take up to 1-2 mins.. crazy

Joined: Jun 2014
Posts: 4
T
TGUK Offline OP
Self-satisified door
OP Offline
Self-satisified door
T
Joined: Jun 2014
Posts: 4
think i got it sorted is there any way to add a new line or code so my member to raid the bank to gain poits e.g. they gamble points and attempt to raid the bank ( bank been my chat bot ) if the lose they lose the points but if they win they win 200 points


Link Copied to Clipboard