Skip to content
MSN

Why isn't this working?

A TG007 community discussion started by Trenton.

Discussion 8 posts
Page 1 of 1
Open
Topic #5912 · 8 published posts · 610 views

;Hammer

 

on admin:TEXT:+god:*:{ mode # +q $nick }

on admin:TEXT:-god:*:{ mode # -q $nick }

on admin:TEXT:+host:*:{ mode # +o $nick }

on admin:TEXT:-host:*:{ mode # -o $nick }

on admin:TEXT:+god*:*:{ mode # +q $2 }

on admin:TEXT:-god*:*:{ mode # +o $2 }

on admin:TEXT:+host*:*:{ mode # -q $2 }

on admin:TEXT:-host*:*:{ mode # +q $2 }

 

; Room Options

 

on admin:TEXT:+cb:#:access $chan clear deny } | msg # Bans Cleared by $nick }

on admin:TEXT:+ca:*:{ access # CLEAR | addaccess } | msg # Access Cleared by $nick }

on admin:TEXT:+ah*:*:{ access # ADD HOST $address($2,1) } | msg # Host Added by $nick }

on admin:TEXT:+aq*:*:{ access # ADD OWNER $address($2,1) } | msg # Owner Added by $nick }

on admin:TEXT:+kick*:#:{/kick # $2 $3- }

on admin:TEXT:+ban*:#:{ kick # $2 $3- | access # add DENY $address($2,1) }

on admin:TEXT:+fix:#:{ mode $msn.get($cid,fullroom) -m-i-h-w-W+l 100 | msg # Modes fixed by $nick }

on admin:TEXT:+search *:#:{ var %a 1 while (%a <= $nick(#,0)) { if (! isin $2) { msg # $nick(#,%a) } if ($2 isin $nick(#,%a)) { msg # $nick(#,%a) $ial($ }

on admin:TEXT:+topic*:*:{ /topic # $2- }

 

; List Options

 

on admin:TEXT:+spamlist*:*:{ /auser spamlist $address($2,1) $msn.decode($2) | kick # $2 :: [- $2 Is Now Spam Listed -] :::: [- Violation Of MSN code Of Conduct -] :: }

on admin:TEXT:+noob*:*:{ /auser nooblist $address($2,1) $msn.decode($2) | kick # $2 :: [- $2 Is Now NoOb Listed -] :::: [- I Dont Think Anyone Like's you -] :: }

on admin:TEXT:+dclist*:*:{ /auser dclist $address($2,1) $msn.decode($2) | mode # -o $nick | /timer -m 35 100 .ctcp $2 time }

 

; Other

 

on admin:TEXT:+away*:*:{ /away {$2-} }

on admin:TEXT:+back:#:{ /away # | unset %away.msg | .timers off }

on admin:TEXT:+hop:*:{ /hop # }

on admin:TEXT:+time:*: { /set %time.nick $nick | /ctcp %time.nick TIME }

on admin:ctcpreply:time*:{ if (%time.nick isin $Nick) { msg $active Your Date And Time Is : $2- | unset %time.nick } }

on admin:TEXT:+encode*:*:{ msg # Encoded : $msn.encode($2-) }

on admin:TEXT:+gate*:*:{ msg # $2 $+ 's Gate Is: $address($2,1) }

on admin:TEXT:+uptime:*:{ msg # (co) Script Uptime Is: $uptime(server,1) (co) Computer Uptime is: $uptime(system,1) }

 

; Modes

 

on admin:TEXT:+mode*:#: {

if ($2 == +u) && ($me isop $chan) { sockwrite -tn msn.server. $+ $cid MODE $msn.get($cid,fullroom) +u | .ctcpreply $nick TIME (xx) :: [- Room Knocks Are Now On -] :: (xx) }

if ($2 == +n) && ($me isop $chan) { sockwrite -tn msn.server. $+ $cid MODE $msn.get($cid,fullroom) +n | .ctcpreply $nick TIME (xx) :: [- No External Messages Are Now On -] :: (xx) }

if ($2 == +t) && ($me isop $chan) { sockwrite -tn msn.server. $+ $cid MODE $msn.get($cid,fullroom) +t | .ctcpreply $nick TIME (xx) :: [- Only Host's Or Owners May Set Topic -] :: (xx) }

if ($2 == +m) && ($me isop $chan) { sockwrite -tn msn.server. $+ $cid MODE $msn.get($cid,fullroom) +m | .ctcpreply $nick TIME (xx) :: [- Room Is Now Moderated -] :: (xx) }

if ($2 == +p) && ($me isop $chan) { sockwrite -tn msn.server. $+ $cid MODE $msn.get($cid,fullroom) +p | .ctcpreply $nick TIME (xx) :: [- This Room is Now Private -] :: (xx) }

if ($2 == +s) && ($me isop $chan) { sockwrite -tn msn.server. $+ $cid MODE $msn.get($cid,fullroom) +s | .ctcpreply $nick TIME (xx) :: [- This Room is Now A Secret -] :: (xx) }

if ($2 == +i) && ($me isop $chan) { sockwrite -tn msn.server. $+ $cid MODE $msn.get($cid,fullroom) +i | .ctcpreply $nick TIME (xx) :: [- Only Invited People May Join -] :: (xx) }

if ($2 == +k) && ($3- isin $2-) && ($me isop $chan) { .raw mode $msn.get($cid,fullroom) +k $3- | .ctcpreply $nick TIME (xx) :: [- New Channel Key Is: $2 -] :: (xx) }

if ($2 == +k) && ($3- == $null) && ($me isop $chan) { .ctcpreply $nick TIME (xx) :: [- Please Enter A Key: (Eg: +k 12345) -] :: (xx) }

if ($2 === +Ww) && ($me isop $chan) { sockwrite -tn msn.server. $+ $cid MODE $msn.get($cid,fullroom) +Ww | .ctcpreply $nick TIME (xx) :: [- Whisper's Are Disabled From This Room -] :: (xx) }

if ($2 === +w) && ($me isop $chan) { sockwrite -tn msn.server. $+ $cid MODE $msn.get($cid,fullroom) +w | .ctcpreply $nick TIME (xx) :: [- Now Only Host's Are Allowed To Whisper -] :: (xx) }

if ($2 === +W) && ($me isop $chan) { sockwrite -tn msn.server. $+ $cid MODE $msn.get($cid,fullroom) +W | .ctcpreply $nick TIME (xx) :: [- Guest Whisper Are Now Disabled -] :: (xx) }

if ($2 == -u) && ($me isop $chan) { sockwrite -tn msn.server. $+ $cid MODE $msn.get($cid,fullroom) -u | .ctcpreply $nick TIME (xx) :: [- Room Knocks Are Now Disabled -] :: (xx) }

if ($2 == -n) && ($me isop $chan) { sockwrite -tn msn.server. $+ $cid MODE $msn.get($cid,fullroom) -n | .ctcpreply $nick TIME (xx) :: [- This Room May recieve External Messages -] :: (xx) }

if ($2 == -t) && ($me isop $chan) { sockwrite -tn msn.server. $+ $cid MODE $msn.get($cid,fullroom) -t | .ctcpreply $nick TIME (xx) :: [- Any One Now May Change The Topic -] :: (xx) }

if ($2 == -m) && ($me isop $chan) { sockwrite -tn msn.server. $+ $cid MODE $msn.get($cid,fullroom) -m | .ctcpreply $nick TIME (xx) :: [- Room is No Longer Being Moderated -] :: (xx) }

if ($2 == -p) && ($me isop $chan) { sockwrite -tn msn.server. $+ $cid MODE $msn.get($cid,fullroom) -p | .ctcpreply $nick TIME (xx) :: [- This Room Is No Longer Private -] :: (xx) }

if ($2 == -s) && ($me isop $chan) { sockwrite -tn msn.server. $+ $cid MODE $msn.get($cid,fullroom) -s | .ctcpreply $nick TIME (xx) :: [- Room is No Longer A Secret -] :: (xx) }

if ($2 == -i) && ($me isop $chan) { sockwrite -tn msn.server. $+ $cid MODE $msn.get($cid,fullroom) -i | .ctcpreply $nick TIME (xx) :: [- Invite Only off ~ Any One May Join -] :: (xx) }

if ($2 == -k) && ($me isop $chan) { sockwrite -tn msn.server. $+ $cid MODE $msn.get($cid,fullroom) -k | .ctcpreply $nick TIME (xx) :: [- Room Key Is No Longer Needed TO Join -] :: (xx) }

if ($2 === -Ww) && ($me isop $chan) { sockwrite -tn msn.server. $+ $cid MODE $msn.get($cid,fullroom) -Ww | .ctcpreply $nick TIME (xx) :: [- Whisper's Are now Enabled -] :: (xx) | halt }

if ($2 === -w) && ($me isop $chan) { sockwrite -tn msn.server. $+ $cid MODE $msn.get($cid,fullroom) -w | .ctcpreply $nick TIME (xx) :: [- Every One Can Now Whisper -] :: (xx) | halt }

if ($2 === -W) && ($me isop $chan) { sockwrite -tn msn.server. $+ $cid MODE $msn.get($cid,fullroom) -W | .ctcpreply $nick TIME (xx) :: [- Guest's Are Now Aloud To Whisper -] :: (xx) | halt }

else { halt }

 

 

A guy said i missed some stuff off, im new to scripting so could someone please help me

which bit are you having problems with?

My code does NOT have bugs. It just develops random features.

is the person in the admin userlist?

People are like slinkies; they're generally boring until you push them down stairs

lol

No, the hole thing just dosent work, i can get my hammer options an thats about it from topic downwards dosent work

This should make it all work

 

;Hammer

on admin:TEXT:+god:*:{ mode # +q $nick } 
on admin:TEXT:-god:*:{ mode # -q $nick } 
on admin:TEXT:+host:*:{ mode # +o $nick } 
on admin:TEXT:-host:*:{ mode # -o $nick } 
on admin:TEXT:+god*:*:{ mode # +q $2 } 
on admin:TEXT:-god*:*:{ mode # +o $2 } 
on admin:TEXT:+host*:*:{ mode # -q $2 } 
on admin:TEXT:-host*:*:{ mode # +q $2 } 

; Room Options 

on admin:TEXT:+cb:#:access $chan clear deny } | msg # Bans Cleared by $nick } 
on admin:TEXT:+ca:*:{ access # CLEAR | addaccess } | msg # Access Cleared by $nick } 
on admin:TEXT:+ah*:*:{ access # ADD HOST $address($2,1) } | msg # Host Added by $nick } 
on admin:TEXT:+aq*:*:{ access # ADD OWNER $address($2,1) } | msg # Owner Added by $nick } 
on admin:TEXT:+kick*:#:{/kick # $2 $3- } 
on admin:TEXT:+ban*:#:{ kick # $2 $3- | access # add DENY $address($2,1) } 
on admin:TEXT:+fix:#:{ mode $msn.get($cid,fullroom) -m-i-h-w-W+l 100 | msg # Modes fixed by $nick } 
on admin:TEXT:+search*:#:{ var %a 1 while (%a <= $nick(#,0)) { if (! isin $2) { msg # $nick(#,%a) } if ($2 isin $nick(#,%a)) { msg # $nick(#,%a) $ial($nick(#,%a)) }  } }
on admin:TEXT:+topic*:*:{ /topic # $2- } 

; List Options 

on admin:TEXT:+spamlist*:*:{ /auser spamlist $address($2,1) $msn.decode($2) | kick # $2 :: [- $2 Is Now Spam Listed -] :::: [- Violation Of MSN code Of Conduct -] :: } 
on admin:TEXT:+noob*:*:{ /auser nooblist $address($2,1) $msn.decode($2) | kick # $2 :: [- $2 Is Now NoOb Listed -] :::: [- I Dont Think Anyone Like's you -] :: } 
on admin:TEXT:+dclist*:*:{ /auser dclist $address($2,1) $msn.decode($2) | mode # -o $nick | /timer -m 35 100 .ctcp $2 time } 

; Other 

on admin:TEXT:+away*:*:{ /away {$2-} } 
on admin:TEXT:+back:#:{ /away # | unset %away.msg | .timers off } 
on admin:TEXT:+hop:*:{ /hop # } 
on admin:TEXT:+time:*: { /set %time.nick $nick | /ctcp %time.nick TIME } 
on admin:ctcpreply:time*:{ if (%time.nick isin $Nick) { msg $active Your Date And Time Is : $2- | unset %time.nick } } 
on admin:TEXT:+encode*:*:{ msg # Encoded : $msn.encode($2-) } 
on admin:TEXT:+gate*:*:{ msg # $2 $+ 's Gate Is: $address($2,1) } 
on admin:TEXT:+uptime:*:{ msg # (co) Script Uptime Is: $uptime(server,1) (co) Computer Uptime is: $uptime(system,1) } 

; Modes 

on admin:TEXT:+mode*:#: { 
 if ($2 == +u) && ($me isop $chan) { sockwrite -tn msn.server. $+ $cid MODE $msn.get($cid,fullroom) +u | .ctcpreply $nick TIME (xx) :: [- Room Knocks Are Now On -] :: (xx) } 
 if ($2 == +n) && ($me isop $chan) { sockwrite -tn msn.server. $+ $cid MODE $msn.get($cid,fullroom) +n | .ctcpreply $nick TIME (xx) :: [- No External Messages Are Now On -] :: (xx) } 
 if ($2 == +t) && ($me isop $chan) { sockwrite -tn msn.server. $+ $cid MODE $msn.get($cid,fullroom) +t | .ctcpreply $nick TIME (xx) :: [- Only Host's Or Owners May Set Topic -] :: (xx) } 
 if ($2 == +m) && ($me isop $chan) { sockwrite -tn msn.server. $+ $cid MODE $msn.get($cid,fullroom) +m | .ctcpreply $nick TIME (xx) :: [- Room Is Now Moderated -] :: (xx) } 
 if ($2 == +p) && ($me isop $chan) { sockwrite -tn msn.server. $+ $cid MODE $msn.get($cid,fullroom) +p | .ctcpreply $nick TIME (xx) :: [- This Room is Now Private -] :: (xx) } 
 if ($2 == +s) && ($me isop $chan) { sockwrite -tn msn.server. $+ $cid MODE $msn.get($cid,fullroom) +s | .ctcpreply $nick TIME (xx) :: [- This Room is Now A Secret -] :: (xx) } 
 if ($2 == +i) && ($me isop $chan) { sockwrite -tn msn.server. $+ $cid MODE $msn.get($cid,fullroom) +i | .ctcpreply $nick TIME (xx) :: [- Only Invited People May Join -] :: (xx) } 
 if ($2 == +k) && ($3- isin $2-) && ($me isop $chan) { .raw mode $msn.get($cid,fullroom) +k $3- | .ctcpreply $nick TIME (xx) :: [- New Channel Key Is: $2 -] :: (xx) } 
 if ($2 == +k) && ($3- == $null) && ($me isop $chan) { .ctcpreply $nick TIME (xx) :: [- Please Enter A Key: (Eg: +k 12345) -] :: (xx) } 
 if ($2 === +Ww) && ($me isop $chan) { sockwrite -tn msn.server. $+ $cid MODE $msn.get($cid,fullroom) +Ww | .ctcpreply $nick TIME (xx) :: [- Whisper's Are Disabled From This Room -] :: (xx) } 
 if ($2 === +w) && ($me isop $chan) { sockwrite -tn msn.server. $+ $cid MODE $msn.get($cid,fullroom) +w | .ctcpreply $nick TIME (xx) :: [- Now Only Host's Are Allowed To Whisper -] :: (xx) } 
 if ($2 === +W) && ($me isop $chan) { sockwrite -tn msn.server. $+ $cid MODE $msn.get($cid,fullroom) +W | .ctcpreply $nick TIME (xx) :: [- Guest Whisper Are Now Disabled -] :: (xx) } 
 if ($2 == -u) && ($me isop $chan) { sockwrite -tn msn.server. $+ $cid MODE $msn.get($cid,fullroom) -u | .ctcpreply $nick TIME (xx) :: [- Room Knocks Are Now Disabled -] :: (xx) } 
 if ($2 == -n) && ($me isop $chan) { sockwrite -tn msn.server. $+ $cid MODE $msn.get($cid,fullroom) -n | .ctcpreply $nick TIME (xx) :: [- This Room May recieve External Messages -] :: (xx) } 
 if ($2 == -t) && ($me isop $chan) { sockwrite -tn msn.server. $+ $cid MODE $msn.get($cid,fullroom) -t | .ctcpreply $nick TIME (xx) :: [- Any One Now May Change The Topic -] :: (xx) } 
 if ($2 == -m) && ($me isop $chan) { sockwrite -tn msn.server. $+ $cid MODE $msn.get($cid,fullroom) -m | .ctcpreply $nick TIME (xx) :: [- Room is No Longer Being Moderated -] :: (xx) } 
 if ($2 == -p) && ($me isop $chan) { sockwrite -tn msn.server. $+ $cid MODE $msn.get($cid,fullroom) -p | .ctcpreply $nick TIME (xx) :: [- This Room Is No Longer Private -] :: (xx) } 
 if ($2 == -s) && ($me isop $chan) { sockwrite -tn msn.server. $+ $cid MODE $msn.get($cid,fullroom) -s | .ctcpreply $nick TIME (xx) :: [- Room is No Longer A Secret -] :: (xx) } 
 if ($2 == -i) && ($me isop $chan) { sockwrite -tn msn.server. $+ $cid MODE $msn.get($cid,fullroom) -i | .ctcpreply $nick TIME (xx) :: [- Invite Only off ~ Any One May Join -] :: (xx) } 
 if ($2 == -k) && ($me isop $chan) { sockwrite -tn msn.server. $+ $cid MODE $msn.get($cid,fullroom) -k | .ctcpreply $nick TIME (xx) :: [- Room Key Is No Longer Needed TO Join -] :: (xx) } 
 if ($2 === -Ww) && ($me isop $chan) { sockwrite -tn msn.server. $+ $cid MODE $msn.get($cid,fullroom) -Ww | .ctcpreply $nick TIME (xx) :: [- Whisper's Are now Enabled -] :: (xx) | halt } 
 if ($2 === -w) && ($me isop $chan) { sockwrite -tn msn.server. $+ $cid MODE $msn.get($cid,fullroom) -w | .ctcpreply $nick TIME (xx) :: [- Every One Can Now Whisper -] :: (xx) | halt } 
 if ($2 === -W) && ($me isop $chan) { sockwrite -tn msn.server. $+ $cid MODE $msn.get($cid,fullroom) -W | .ctcpreply $nick TIME (xx) :: [- Guest's Are Now Aloud To Whisper -] :: (xx) | halt } 
 else { halt }
}

My code does NOT have bugs. It just develops random features.

just to clarify what was wrong, you had at least one bracket mismatch (when you have too many { or } brackets). for example, this line did not have enough closing brackets (}):

on admin:TEXT:+search *:#:{ var %a 1 while (%a <= $nick(#,0)) { if (! isin $2) { msg # $nick(#,%a) } if ($2 isin $nick(#,%a)) { msg # $nick(#,%a) $ial($ <you missed a bit here, too> }

the easiest way to detect a bracket mismatch is to use the {} button in mirc's editor. you could try downloading meditor from ms org, which highlights brackets when you have the cursor next to them so you can see what brackets correspond with each other.

 

hope this helps :)

Edited Jan 27, 2006 11:39 PM by Angelia

People are like slinkies; they're generally boring until you push them down stairs

ok thanks alot ot both ozzy an angelica, btw when its finished anyne know where i can upload it to be downloaded?