This is the new home of the egghelp.org community forum.
All data has been migrated (including user logins/passwords) to a new phpBB version.


For more information, see this announcement post. Click the X in the top right-corner of this box to dismiss this message.

im in need of a timed event

Requests for complete scripts or modifications/fixes for scripts you didn't write. Response not guaranteed, and no thread bumping!
User avatar
caesar
Mint Rubber
Posts: 3778
Joined: Sun Oct 14, 2001 8:00 pm
Location: Mint Factory

Post by caesar »

The {* */2 * * *} is correct, cos without the '/' it would be every day at 02:00.
Once the game is over, the king and the pawn go back in the same box.
G
Gemster
Halfop
Posts: 51
Joined: Mon Oct 04, 2010 5:43 pm

Post by Gemster »

Thanks caesar but im trying to use your code but it dont seem to work :/

Code: Select all

bind pub - .tssync switch:sync 

proc switch:sync {nick uhost handle chan text} { 
  switch -nocase [lindex [split $text] 0] { 
    "on" { 
      putserv "NOTICE $nick :TSSync turned on." 
      bind cron - {* */1 * * *} cron:sync 
    } 
    "off" { 
      putserv "NOTICE $nick :TSSync turned off." 
      unbind cron - {* */1 * * *} cron:sync 
    } 
    default { 
      putserv "NOTICE $nick :Use .tssync on/off." 
    } 
  } 
} 

proc cron:sync {minute hour day month weekday} { 
  putserv "PRIVMSG OperServ :tssync" 
} 
Thanks
Gemster
G
Gemster
Halfop
Posts: 51
Joined: Mon Oct 04, 2010 5:43 pm

Post by Gemster »

ohh and btw im having a little problem with this if statement:

Code: Select all

if {[isop $nick ###1] == 1} {
well this works for ops in the channel ###1 but it does bnot work for any1 higher than chan ops.

Like say the user was a channel admin or channel founder then this if statement does not work :/

how could i add it for ops or higher ?

Thanks
Gemster
w
willyw
Revered One
Posts: 1203
Joined: Thu Jan 15, 2009 12:55 am

Post by willyw »

Gemster wrote: ...

Code: Select all

if {[isop $nick ###1] == 1} {
well this works for ops in the channel ###1 but it does bnot work for any1 higher than chan ops.

Like say the user was a channel admin or channel founder then this if statement does not work :/
...
Something to check:

(for an example, go here: http://eggwiki.org/Eggdrop.conf )


Look in eggdrop.conf for:
set opchars "@"

If it is as above, then try changing it to:
set opchars "@&~"
and then .restart your bot.

There is a brief explanation there in that well commented eggdrop.conf that you can find online with the link above.

I hope this helps.
G
Gemster
Halfop
Posts: 51
Joined: Mon Oct 04, 2010 5:43 pm

Post by Gemster »

Look in eggdrop.conf for:
set opchars "@"

If it is as above, then try changing it to:
set opchars "@&~"
and then .restart your bot.
i checked and it already says: set opchars "@&~"

These are correct for my server too but if u are a & or ~ ie: admin or founder it dont work.

It only works with ops, @ :/

Thanks
Gemster
User avatar
caesar
Mint Rubber
Posts: 3778
Joined: Sun Oct 14, 2001 8:00 pm
Location: Mint Factory

Post by caesar »

Well, you have to start it with '.tssync on' :)
Once the game is over, the king and the pawn go back in the same box.
G
Gemster
Halfop
Posts: 51
Joined: Mon Oct 04, 2010 5:43 pm

Post by Gemster »

caesar wrote:Well, you have to start it with '.tssync on' :)
I tryed
.tssync on
.tssync off
.tssync

and none worked, just nothing, no notice nothing.

Thanks
Gemster
G
Gemster
Halfop
Posts: 51
Joined: Mon Oct 04, 2010 5:43 pm

Post by Gemster »

caesar wrote:Well, you have to start it with '.tssync on' :)
error i found with your code

Tcl error [switch:sync]: bad option "-nocase": must be -exact, -glob, -regexp, or --

Thanks
Gemster
t
thommey
Halfop
Posts: 76
Joined: Tue Apr 01, 2008 2:59 pm

Post by thommey »

For the switch error:

Code: Select all

switch -nocase -- [lindex ..] {
"--" marks the end of options.

For the opchars issue, the opchars feature in Eggdrop is useless, it only works on the initial join of the bot, it doesn't even parse +a/+q changes. It's planned to be fixed, but in the meantime you can use a script like this which will provide you [isadmin] and [isowner] so you can use them in your code ({[isop $n $c] || [isadmin $n $c] || [isowner $n $c]}). It's adjusted for UnrealIRCd, if you have different modes you might need to adjust the "parsemodestr" procedure to account for other modes (raw 005 tells you about them).
w
willyw
Revered One
Posts: 1203
Joined: Thu Jan 15, 2009 12:55 am

Post by willyw »

Gemster wrote:
...
i checked and it already says: set opchars "@&~"

These are correct for my server too but if u are a & or ~ ie: admin or founder it dont work.

It only works with ops, @ :/
I don't know what to say.

I just tried it with a bot of mine, in a channel I own.
The ircd is Unreal3.2.1
and I do not appear with @. I appear in my channel with ~.

In the partyline:
.tcl isop <mynick> #mychan
<botnick> Tcl: 1

So, the bot is detecting me as an op.

I'm sorry that it isn't working for you, and I wish I knew what else to tell you to try. If it is something simple, then it is escaping me at the moment.
G
Gemster
Halfop
Posts: 51
Joined: Mon Oct 04, 2010 5:43 pm

Post by Gemster »

Ok, just figured it out, if the chan is reged and u are the owner u get ~ and when u join it sets u as +oq and as admin sets u as +oa so u always get the +o flag as op.

I had my auto op turned off so i had to manually set my self as owner thus i wasent getting the +o flag.

works fine now.

Thanks
Gemster
Post Reply