| View previous topic :: View next topic |
| Author |
Message |
caesar Mint Rubber

Joined: 14 Oct 2001 Posts: 3741 Location: Mint Factory
|
Posted: Wed Feb 16, 2011 8:04 am Post subject: |
|
|
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. |
|
| Back to top |
|
 |
Gemster Halfop
Joined: 04 Oct 2010 Posts: 51
|
Posted: Wed Feb 16, 2011 9:34 am Post subject: |
|
|
Thanks caesar but im trying to use your code but it dont seem to work :/
| Code: | 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 |
|
| Back to top |
|
 |
Gemster Halfop
Joined: 04 Oct 2010 Posts: 51
|
Posted: Wed Feb 16, 2011 9:57 am Post subject: |
|
|
ohh and btw im having a little problem with this if statement:
| Code: | | 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 |
|
| Back to top |
|
 |
willyw Revered One
Joined: 15 Jan 2009 Posts: 1175
|
Posted: Wed Feb 16, 2011 10:16 am Post subject: |
|
|
| Gemster wrote: |
...
| Code: | | 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. |
|
| Back to top |
|
 |
Gemster Halfop
Joined: 04 Oct 2010 Posts: 51
|
Posted: Wed Feb 16, 2011 10:35 am Post subject: |
|
|
| Quote: | 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 |
|
| Back to top |
|
 |
caesar Mint Rubber

Joined: 14 Oct 2001 Posts: 3741 Location: Mint Factory
|
Posted: Wed Feb 16, 2011 10:49 am Post subject: |
|
|
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. |
|
| Back to top |
|
 |
Gemster Halfop
Joined: 04 Oct 2010 Posts: 51
|
Posted: Wed Feb 16, 2011 10:56 am Post subject: |
|
|
| 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 |
|
| Back to top |
|
 |
Gemster Halfop
Joined: 04 Oct 2010 Posts: 51
|
Posted: Wed Feb 16, 2011 5:01 pm Post subject: |
|
|
| 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 |
|
| Back to top |
|
 |
thommey Halfop
Joined: 01 Apr 2008 Posts: 73
|
Posted: Wed Feb 16, 2011 9:16 pm Post subject: |
|
|
For the switch error:
| Code: |
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). |
|
| Back to top |
|
 |
willyw Revered One
Joined: 15 Jan 2009 Posts: 1175
|
Posted: Wed Feb 16, 2011 10:03 pm Post subject: |
|
|
[quote="Gemster"] | Quote: |
...
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. |
|
| Back to top |
|
 |
Gemster Halfop
Joined: 04 Oct 2010 Posts: 51
|
Posted: Thu Feb 17, 2011 3:52 am Post subject: |
|
|
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 |
|
| Back to top |
|
 |
|